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 ] + " "); } } } }
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 + " "); } } }
namespace CuriousTabConsoleApplication { 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 + ", "); } } }
Copyright ©CuriousTab. All rights reserved.