Menu
Home
Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
VB.NET
VB.NET General Discussion
Passing optional parameters to nested functions
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Shankar_R" data-source="post: 157585" data-attributes="member: 45553"><p>As an update, I found a fix- declare Before and After as Objects instead of Integer. (Key still needs to remain as String. Apparently the 'Nothing' value of Key is passed on properly. If I replace the msgbox statement by MsgBox Key=vbnullstring, I get true. However, if I call the Add method twice using vbnullstring as the key explicitly, I get an error for key clash. Doesn't happen when I use 'Nothing' as the argument though. Seems a bit counter-intuitive since I would assume that since Key is strongly typed to be a string, 'Nothing' would be reduced to vbNullString (as is confirmed by the Msgbox), but clearly something else is going on!</p></blockquote><p></p>
[QUOTE="Shankar_R, post: 157585, member: 45553"] As an update, I found a fix- declare Before and After as Objects instead of Integer. (Key still needs to remain as String. Apparently the 'Nothing' value of Key is passed on properly. If I replace the msgbox statement by MsgBox Key=vbnullstring, I get true. However, if I call the Add method twice using vbnullstring as the key explicitly, I get an error for key clash. Doesn't happen when I use 'Nothing' as the argument though. Seems a bit counter-intuitive since I would assume that since Key is strongly typed to be a string, 'Nothing' would be reduced to vbNullString (as is confirmed by the Msgbox), but clearly something else is going on! [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Forums
VB.NET
VB.NET General Discussion
Passing optional parameters to nested functions
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom