PDA

View Full Version : سوالی درباره لیست ها



csharpprogramer88
سه شنبه 22 مهر 1393, 21:13 عصر
سلام

دوستان در لیست میشود اطلاعاتی را بصورت آیدی (نوعش اینت ) ، نام (استرینگ) شماره تلفن (استرینگ ) قرار داد (به تعداد N تا سطر )

Mori Bone
سه شنبه 22 مهر 1393, 21:28 عصر
class informations
{
private int IDNumber { get; set; }
private string TellNumber { get; set; }
private string[] Contracts { get; set; }

public informations(int id, string tell, string[] contracts)
{
this.IDNumber = id;
this.TellNumber = tell;
this.Contracts = contracts;
}
}



List<informations> users = new List<informations> {
new informations(50, "123", new string[] { "gharardade 1 az id 50", "gharardade 2 az id 50" }),
new informations(900, "67", new string[] { "gharardade 1 az id 900", "gharardade 2 az id 900" }),
new informations(2, "54", new string[] { "a", "b" })
};