public static void Main(string[] args) { CustomerStruct customer=new CustomerStruct(); System.Console.WriteLine("Struct values before initialization"); System.Console.WriteLine("ID={0},Name={1}",customer.ID,customer.name); customer.ID=100; customer.name="Robert"; System.Console.WriteLine("Struct values after initialization"); System.Console.WriteLine("ID={0},Name={1}",customer.ID,customer.name); }
public static void Main(string[] args) { CustomerStruct customer = new CustomerStruct(); System.Console.WriteLine("Struct values before initialization"); System.Console.WriteLine("ID={0},Name={1}", customer.ID, customer.name); customer.ID = 100; customer.name = "Robert"; System.Console.WriteLine("Struct values after initialization"); System.Console.WriteLine("ID={0},Name={1}", customer.ID, customer.name); }