Banner Ad

Thursday, September 3, 2015

Daily Interview Questions #15 : What is the difference between the C# keywords ‘ref’ and ‘out’?

By Francis   Posted at   5:26 AM   C# Interview Questions No comments

ref

out

Parameters passed with the prefix “ref”. By using “ref” C# implements the concept called “Call by reference”. Parameters passed with the prefix “out”.
An argument passed by ref must be assigned with a value before the call. ‘out’ parameter must assigned with some value prior to the termination of the function.

About Francis

Francis, an Associate at Cognizant. Having 7+ Years of experience in Microsoft web technologies.

0 comments :

Please give your valuable comments to improve the contents

Connect with Us