Posts

Showing posts with the label #C# #OutParameter

C# Out Parameter

C# provides   out   keyword to pass arguments as out-type. It is like reference-type, except that it does not require variable to initialize before passing. We must use   out   keyword to pass argument as out-type. It is useful when we want a function to return multiple values. C# Out Parameter Example 1 using  System;   namespace  OutParameter   {        class  Program       {            // User defined function             public   void  Show( out   int  val)  // Out parameter            {                int  square = 5;             ...