Hello I am reading a book on C# and on the generic methods section I got this question: How are object values passed in generic methods? a. They are passed by value. b. They are passed by reference. c. They must be encapsulated in a property. d. They are passed during class instantiation. the correct answer in the book is B, but after I do some checking I can verify that I can pass values by ref or without ref. so what can I be missing here?
with an object, I still don't need to use ref keywork... maybe I making some confusion about the "reference" they are refering to. The code above and here is mine from testing.
can you show me a sample code to explain that the awser B is the correct? regards. |
Monday, September 1, 2014
passing values in Generic methods
Labels:
big loop My VS C#
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment