Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Premium
Register
Login
Understanding ref and out keywords - Language C#
Jan 24 2015
6.1k
0
0
2
Recommended Videos
Sending WhatsApp Message using C# Code
Sekhar Srinivas
Jun 24
223.3k
What is new in C# 6.0
Mahesh Chand
Aug 06
26.2k
C# 6.0 New Features: Part 1
Sekhar Srinivas
Dec 23
20.8k
Gaurav Kumar Arora
This is a very initial video tutorial showing about ref and out keywords. The ref keyword causes argument passed by reference. The effect is that any changes is made to the parameter in the method will be reflected in that variable when control passes back to the calling method. The out keyword also causes argument to be passed by reference. There is no need to initialize the out variable, as it requires in case of ref variable.Both ref and out are treated differently at runtime, but treated the same at compilation. Therefore, methods can’t be overloaded, if one method takes a ref keyword and the other takes an out argument.
c#
csharp
ref and out keywords of Csharp
video tutorials