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 + ", "); } } }
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 + " "); } } }
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 Sample { public static void fun1() { Console.WriteLine("CuriousTab1 method"); } public void fun2() { fun1(); Console.WriteLine("CuriousTab2 method"); } public void fun2(int i) { Console.WriteLine(i); fun2(); } } class MyProgram { static void Main(string[ ] args) { Sample s = new Sample(); Sample.fun1(); s.fun2(123); } } }
Tab1 method
123
Tabl method
Tab2 method
Tab1 method
123
Tab2 method
Tab2 method
123
Tab2 method
Tabl method
Tabl method
123
Tab2 method
123
Tabl method
Tab1 method
123
Tabl method
Tab2 method
namespace CuriousTabConsoleApplication { class Sample { static Sample() { Console.Write("Sample class "); } public static void CuriousTab1() { Console.Write("CuriousTab1 method "); } } class MyProgram { static void Main(string[ ] args) { Sample.CuriousTab1(); } } }
Sample s1 = new Sample(); Sample s2 = new Sample(9, 5.6f);
public Sample()
{
i = 0;
j = 0.0f;
}
public Sample (int ii, Single jj)
{
i = ii;
j = jj;
}
public Sample (Optional int ii = 0, Optional Single jj = 0.0f)
{
i = ii;
j = jj;
}
public Sample (int ii, Single jj)
{
i = ii;
j = jj;
}
Sample s;
s = new Sample();
public Sample()
{
i = 0;
j = 0.0f;
}
public Sample (int ii, Single jj)
{
i = ii;
j = jj;
}
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.