using System.Collections.Generic;
private string _PlaceOfBirth;
public ClsPerson(string name,int age,string placeofbirth){
this._PlaceOfBirth=placeofbirth;
public string getName(){return _Name;}
public int getAge(){return _Age;}
public string getPlaceOfBirth(){return _PlaceOfBirth ;}
Console.WriteLine("name : "+ getName() + "; age: "+ getAge() +" ; placeofbirth : "+ getPlaceOfBirth()) ;
public static void Main()
Console.WriteLine("enter number of persons: ");
int num = int .Parse(Console.ReadLine());
SortedList<string,ClsPerson> st = new SortedList<string,ClsPerson>();
ClsPerson[] person = new ClsPerson[num];
Console.WriteLine("enter name of person: ");
string name = Console.ReadLine();
Console.WriteLine("enter age of person: ");
int age = int .Parse(Console.ReadLine());
Console.WriteLine("enter place of birth of person: ");
string placeofbirth =Console.ReadLine();
person[i]=new ClsPerson(name,age,placeofbirth);
Console.WriteLine("hash table entries are: ");
foreach (KeyValuePair<string,ClsPerson> kvp in st)
Console.WriteLine(kvp.Key + " " + "can vote!!");
Console.WriteLine(kvp.Key + " " + "cannot vote!");
foreach(ClsPerson p in person ){