lớp People
class People
{
public string Id { get; set; }
public string Name { get; set;}
public float Age{ get; set; }
}
giờ em muốn ó sánh tuổi của đối tượng People rồi in ra theo thứ tự thì làm thế nào ạ em cảm ơn mọi người
static void Main(string[] args)
{
Hashtable ht=new Hashtable();
for(int i=0;i<1;i++)
{
People p = new People();
Console.WriteLine("xin moi nhap Id nha :");
p.Id = Console.ReadLine();
Console.WriteLine("xin moi ban nhap Name nha :");
p.Name = Console.ReadLine();
Console.WriteLine("moi ban nhap tuoi nha :");
p.Age = Convert.ToInt16(Console.ReadLine());
ht.Add(p.Id, p);
}
}
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?