using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Programming_Console
{
/// <summary>
/// using Properties
/// </summary>
class Employee
{
private int age;
public int Age
{
get { return age; }
set { age = value; }
}
}
class Program
{
static void Main(string[] args)
{
Employee emp = new Employee();
emp.Age = 35;
Console.WriteLine("Age of Employee is : {0}", emp.Age);
Console.ReadKey();
}
}
}This code show how to use Property in C#
