interface IMyInterface { void fun1(); int fun2(); } class MyClass: IMyInterface { void fun1() { } int IMyInterface.fun2() { } }
struct Emp { public String name; public int age; public Single sal; } Emp e = new Emp();
e.name = "Amol";
e.age = 25;
e.sal = 5500;
With e
{
.name = "Amol";
.age = 25;
.sal = 5500;
}
With emp e
{
.name = "Amol";
.age = 25;
.sal = 5500;
}
e -> name = "Amol";
e -> age = 25;
e -> sal = 5500;
name = "Amol";
age = 25;
sal = 5500;
e.name = "Amol";
e.age = 25;
e.sal = 5500;
int[ , ] intMyArr = {{7, 1, 3}, {2, 9, 6}};
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.