The Ref keyword is well known. It indicates that you are passing a reference, not a value, to a method. That means that if the method modifies the value, the changes will be apparent to the calling method as well. Where I see a lot of confusion, however, is what happens when dealing with reference types. It is common to say that methods pass objects by reference, but that's not entirely true.First, a pop quiz. Without actually running the code, what do you think this code snippet will produce? Read more: Codeproject
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment