jump to navigation

‘ref’ and ‘out’ in C# is Bizarre and confusing… September 4, 2007

Posted by addisu in Software - .NET 2.0, Software - .NET General, Software - C#.
trackback

i tried to really see the difference of these key words in C# and i still get it weired.

http://msdn2.microsoft.com/en-us/vcsharp/aa336814.aspx

  • for ‘out’, we can pass the variable unassigned but we have to make sure we assign it before use in the callee method
  • for ‘ref’, we have to assign the variable before we pass it…

i still see both as pass by reference kind of thing…

any suggestions….?

Comments»

No comments yet — be the first.