private string[] locations = { "delhi", "lucknow", "agra", "mumbai" };
private string _OtherLocation;
public Location(string loc) => _OtherLocation = loc;
public string OtherLocation
set => _OtherLocation = value;
public string this[int index]
set => locations[index] = value;
public void ShowOtherLocation() => Console.WriteLine("Location : "+ _OtherLocation);
public void ShowLocation(int index) => Console.WriteLine("Location : "+this[index]);
~Location() => Console.WriteLine("clearing all the resources.");
public static void Main()
Location loc = new Location("chennai");
loc.OtherLocation = "abc";