“Life isn’t about finding yourself.....Life is about creating yourself.”
Tuesday, August 9, 2011
What is Difference Between Out and Ref keyword in C#?
Out
&
Ref
keywords in C# are used for returning multiple values from a function.
Difference:
Out
parameter need to be initialized inside the body of a method but not in the case of
ref
parameter.
Example of Out Keyword
Example of Ref Keyword
Example of Out & Ref Keyword
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment