namespace CuriousTabConsoleApplication { 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 CuriousTabConsoleApplication { class SampleProgram { static void Main(string[ ] args) { int i = 5; int j; fun1(ref i); fun2(out j); Console.WriteLine(i + ", " + j); } static void funl(ref int x) { x = x * x; } static void fun2(out int x) { x = 6; x = x * x; } } }
fun(int i, Single j, double k) decimal
{ ... }
static decimal fun(int i, Single j, double k)
{ ... }
fun(int i, Single j, double k)
{
...
return decimal;
}
static decimal fun(int i, Single j, double k) decimal
{ ... }
namespace CuriousTabConsoleApplication { 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 + " "); } } }
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.