Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
Is there a differance between VB and C# parameter passing that I need to be aware of (as far as default type (ByVal, or referance), as far as doing specifics: ref/out/normal compared to VB's equivelants?
  • *Gurus*
Posted

Not really, passing by value is the default for both. C# is a little more strict when it comes to reference parameters, though - it separates them in to "ref" and "out" parameters. Ref is standard passing a variable by reference, but out forces the procedure to explicitly assign to the parameter before leaving.

 

Also, C# makes you specify "ref" and "out" when actually calling the method, too.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...