namespace CuriousTabConsoleApplication { class Sample { int i, j; public void SetData(int ii, int jj) { this.i = ii; this.j = jj } } class MyProgram { static void Main(string[ ] args) { Sample s1 = new Sample(); s1.SetData(10, 2); Sample s2 = new Sample(); s2.SetData(5, 10); } } }
int i; int j = new int(); i = 10; j = 20; String str; str = i.ToString(); str = j.ToString();
namespace CuriousTabConsoleApplication { class Sample { public int index; public int[] arr = new int[10]; public void fun(int i, int val) { arr[i] = val; } } class MyProgram { static void Main(string[] args) { Sample s = new Sample(); s.index = 20; Sample.fun(1, 5); s.fun(1, 5); } } }
class Sample { private int i; public Single j; private void DisplayData() { Console.WriteLine(i + " " + j); } public void ShowData() { Console.WriteLine(i + " " + j); } }
sample c; c = new sample();
namespace CuriousTabConsoleApplication { class Sample { int i; Single j; public void SetData(int i, Single j) { this.i = i; this.j = j; } public void Display() { Console.WriteLine(i + " " + j); } } class MyProgram { static void Main(string[ ] args) { Sample s1 = new Sample(); s1.SetData(36, 5.4f); s1.Display(); } } }
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.