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
{
public int Age { get; set; }
public string Name { get; set; }
public double Salary { get; set; }
public DateTime dt { get; set; }
public string phone { get; set; }
}
class Program
{
static void Main(string[] args)
{
Employee emp = new Employee();
Console.WriteLine("Enter the Employee's Age");
emp.Age = int.Parse(Console.ReadLine());
Console.WriteLine("Enter the Employee's Name");
emp.Name = Console.ReadLine();
Console.WriteLine("Enter the Salary for the Employee");
emp.Salary = double.Parse(Console.ReadLine());
emp.dt = DateTime.Now;
Console.WriteLine("Enter the Phone Number");
emp.phone = Console.ReadLine();
System.Threading.Thread.Sleep(2000);
Console.WriteLine("Employee: {0} of Age {1} with Salary {2} and Conact Number {3} is hired on Date {4}", emp.Name,emp.Age,emp.Salary,emp.phone,emp.dt.Date);
Console.ReadKey();
}
}
}This program for Creating Properties in A separate Class and Using it.
