Re: overloading
From: Landley (news_at_creations-software.co.uk)
Date: 12/13/04
- Next message: Chris Hyde: "Re: What does the capital "N" signify?"
- Previous message: Tom Wilson: "Re: Quick Vb6 To Vb.Net Conversion"
- In reply to: Dave: "overloading"
- Next in thread: Dave: "Re: overloading"
- Reply: Dave: "Re: overloading"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 13 Dec 2004 22:23:01 -0000
This cannot be erroring in the method's signature. If the value of the
argument is null, this can be passed into the method. It just needs
checking before it is used.
Landers
"Dave" <dave_Please_reply_to_group_only@stic.net> wrote in message
news:uuj1d$U4EHA.1404@TK2MSFTNGP11.phx.gbl...
> I have a function 'Private MyFunc(ByVal dbS as String) As Boolean' where
dbS
> is a database value determined by the database reader method.
>
> I was having some difficulty when dbS is null, so I decided to create an
> overloaded function: 'Private Overloads MyFunc(ByVal dbS as DBNull) As
> Boolean'. I added the Overloads keyword to the original also, of course.
>
> This resulted in the run-time error "Public member 'MyFunc' on type
> 'MyClass' not found."
>
> This did not make sense, but on a whim, I changed the Private declarations
> to Public, and it worked fine. Can anyboday explain this? Why does
> overloading change the requirements of Private/Public?
>
> Thanks,
>
> Dave
>
>
- Next message: Chris Hyde: "Re: What does the capital "N" signify?"
- Previous message: Tom Wilson: "Re: Quick Vb6 To Vb.Net Conversion"
- In reply to: Dave: "overloading"
- Next in thread: Dave: "Re: overloading"
- Reply: Dave: "Re: overloading"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|