internal class Program { static void Main(string[] args) { Person prs = new Person(); prs.setpersonid(100); prs.setfirstname("mehdi"); Console.WriteLine(prs.getpersonid()+"\t"+prs.getfirstname()); Console.ReadKey(); } } class Person { public int personId; string firstName; string lastName; int age; public void printpersoninfo() { Console.WriteLine("id:{0}\nfirstname:{1}\nlastname:{2}age:{3}", personId, firstName, lastName, age); } public void setpersonid(int personId) { this.personId = personId; } public int getpersonid() { return this.personId; } public void setfirstname(string firstName) { this.firstName = firstName; } public string getfirstname() { return this.firstName; } }