class human { public int age; public string sex; public human(int a, string s) {age=a;sex=s;} public string isex { get { return sex; } set { sex = value; } } }
human John = new human(23, "Male"); System.Console.WriteLine(John.isex); //Male John.isex = "Female"; System.Console.WriteLine(John.isex); //Female