optional param in Method
- From: "Rick" <RickREMOVETHIS@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 14 Mar 2008 15:35:43 -0600
VS2005 Pro
I have confusing results from an optional parameter in a method.
Public Shared Function Parameter(ByVal parameterName As String, ByVal
parameterValue As Object, Optional ByVal db_Type As FbDbType = Nothing) As
FbParameter
FbDbType is an enumeration with 0 = "Array", 1 = "BigInt" etc.
When I call this method and omit the db_Type value like this:
myParam = Parameter("param1", 1234)
the value of db_Type is "Array" rather than "nothing" like I expect. I
suspect this has something to do with the fact that the db_Type is really an
Integer type and cannot be initialized to "Nothing". I need to test if
db_Type has been initialized in my method and assign it to a var in the
method.
Is my suspicion correct and is there some other way to do this?
Regards,
Rick
.
- Follow-Ups:
- Re: optional param in Method
- From: Rick
- Re: optional param in Method
- From: Armin Zingler
- Re: optional param in Method
- Prev by Date: Re: visual basic 2008 on vista error
- Next by Date: Re: where is the real VB group?
- Previous by thread: Re: visual basic 2008 on vista error
- Next by thread: Re: optional param in Method
- Index(es):