Wednesday, October 12, 2016

#C# Ref Parameters vs. Out Parameters in C#

Ref Parameters vs. Out Parameters in C# Ref: The ref keyword is used to pass an argument as a reference. This means that when value of that parameter is changed in the method, it gets reflected in the calling method. An argument that is passed using a ref keyword must be initialized in the calling method before it is passed to the called method. Out: The out keyword is used to pass an...