struct Emp { private String name; private int age; private Single sal; }
namespace CuriousTabConsoleApplication { struct Sample { public int i; } class MyProgram { static void Main(string[] args) { Sample x = new Sample(); x.i = 10; fun(ref x); Console.Write(x.i + " "); } public static void fun(ref Sample y) { y.i = 20; Console.Write(y.i + " "); } } }
class Trial { int i; Decimal d; } struct Sample { private int x; private Single y; private Trial z; } Sample ss = new Sample();
struct Book { private String name; private int noofpages; private Single price; } Book b = new Book();
struct Address { private int plotno; private String city; } Address a = new Address(); Address b; b = a;
Copyright ©CuriousTab. All rights reserved.