Example.....
class Arvind
{
private int rollno;
private string name;
public int setrollno()
{
return rollno;
}
public void getrollno(int values)
{
rollno = values;
}
public string getname()
{
return name;
}
public void setname(string abc)
{
name = abc;
}
static void Main(string[] args)
{
Arvind example = new Arvind();
example.rollno = 5; // set { }
example.name = "arvind";
Console.WriteLine(example.rollno); // get { }
Console.WriteLine(example.name);
Console.ReadLine();
}
}
class Arvind
{
private int rollno;
private string name;
public int setrollno()
{
return rollno;
}
public void getrollno(int values)
{
rollno = values;
}
public string getname()
{
return name;
}
public void setname(string abc)
{
name = abc;
}
static void Main(string[] args)
{
Arvind example = new Arvind();
example.rollno = 5; // set { }
example.name = "arvind";
Console.WriteLine(example.rollno); // get { }
Console.WriteLine(example.name);
Console.ReadLine();
}
}