Create | Hello Guest |
namespace IndiabixConsoleApplication{class SampleProgram{static void Main(string[] args){int num = 1;funcv(num);Console.Write(num + ", ");funcr(ref num);Console.Write(num + ", ");}static void funcv(int num){num = num + 10; Console.Write(num + ", ");}static void funcr (ref int num){num = num + 10; Console.Write(num + ", ");}}}
{class SampleProgram{static void Main(string[] args){int[]arr = newint[]{ 1, 2, 3, 4, 5 };fun(ref arr);}static void fun(ref int[] a){for (int i = 0; i < a.Length; i++){a[i] = a[i] * 5;Console.Write(a[ i ] + " ");}}}}
namespace IndiabixConsoleApplication{class SampleProgram{static void Main(string[] args){int a = 5;int s = 0, c = 0;Proc(a, ref s, ref c);Console.WriteLine(s + " " + c);}static void Proc(int x, ref int ss, ref int cc){ss = x * x;cc = x * x * x;}}}
namespace IndiabixConsoleApplication{class SampleProgram{static void Main(string[ ] args){int i = 10;double d = 34.340;fun(i);fun(d);}static void fun(double d){Console.WriteLine(d + " ");}}}