Posts

Showing posts with the label #C# #CallByReference

C# Call By Reference

C# provides a   ref   keyword to pass argument as reference-type. It passes reference of arguments to the function rather than copy of original value. The changes in passed values are permanent and   modify   the original variable value. C# Call By Reference Example using  System;   namespace  CallByReference   {        class  Program       {            // User defined function             public   void  Show( ref   int  val)           {                val *= val;  // Manipulating value                Console.WriteLine( "Valu...