class Program
{
static void Main(string[] args)
{
List<Employee> emp = new List<Employee> {
new Employee{Name="Kulshresth0",Address="Noida0"},
new Employee{Name="Kulshresth1",Address="Noida1"},
new Employee{Name="Kulshresth2",Address="Noida2"},
new Employee{Name="Kulshresth3",Address="Noida3"},
};
foreach(Employee em in emp)
{
Console.WriteLine("Name : "+em.Name +" "+"Address : "+em.Address);
}
Console.ReadLine();
}
}-----------------------------
class Employee
{
public string Name { get; set; }
public string Address { get; set; }
}
{
static void Main(string[] args)
{
List<Employee> emp = new List<Employee> {
new Employee{Name="Kulshresth0",Address="Noida0"},
new Employee{Name="Kulshresth1",Address="Noida1"},
new Employee{Name="Kulshresth2",Address="Noida2"},
new Employee{Name="Kulshresth3",Address="Noida3"},
};
foreach(Employee em in emp)
{
Console.WriteLine("Name : "+em.Name +" "+"Address : "+em.Address);
}
Console.ReadLine();
}
}-----------------------------
class Employee
{
public string Name { get; set; }
public string Address { get; set; }
}
No comments:
Post a Comment