39.
class Ishchi
{
public int id { get; set; }
public string ismi { get; set; }
public string familiya { get; set; }
public string oylik { get; set; }
public string manzil { get; set; }
}
class Program
{
static void Main(string[] args)
{
List Ishchilar =new List()
{
new Ishchi(){ id = 1, ismi = "Madina", familiya =
"YANGIBOYEVA", oylik = "500$", manzil = "shovot" },
new Ishchi(){ id = 1, ismi = "Maftuna", familiya =
"YANGIBOYEVA", oylik = "300$", manzil = "shovot" },
new Ishchi(){ id = 1, ismi = "Alisher", familiya =
"YANGIBOYEV", oylik = "300$", manzil = "shovot" },
new Ishchi(){ id = 1, ismi = "G'ulom", familiya =
"YANGIBOYEV", oylik = "500$", manzil = "shovot" },
};
var k = Ishchilar.Where(n => n.oylik == "500$");
foreach (var i in k)
{
Console.WriteLine(i.ismi);
}
Console.ReadKey();
}
}
40.
class Sportchi
{
public int id { get; set; }
public string ism { get; set; }
public double ball { get; set; }
public string jinsi { get; set; }
}
class Program
{
static void Main(string[] args)
{
List sportchi = new List()
{
new
Sportchi(){id=1,ism="Husanboy",ball=65,jinsi="erkak"},
new Sportchi(){id=2,ism="Alisher",ball=90,jinsi="erkak"},
new Sportchi(){id=3,ism="Gulom",ball=85,jinsi="erkak"},
new
Sportchi(){id=4,ism="Gulchexra",ball=100,jinsi="ayol"},
};
var k = sportchi.Where(n => n.ball==100 && n.jinsi=="ayol");
foreach (var i in k)
{
Console.WriteLine(i.ism);
}
Console.ReadKey();
}
}
41.
class Sportchi
{
public int id { get; set; }
public string ism { get; set; }
public double ball { get; set; }
public string jinsi { get; set; }
}
class Program
{
static void Main(string[] args)
{
List sportchi = new List()
{
new
Sportchi(){id=1,ism="Husanboy",ball=34,jinsi="erkak"},
new Sportchi(){id=2,ism="Alisher",ball=90,jinsi="erkak"},
new Sportchi(){id=3,ism="Gulom",ball=85,jinsi="erkak"},
new
Sportchi(){id=4,ism="Gulchexra",ball=10,jinsi="ayol"},
};
var k = sportchi.Where(n => n.ball<50);
foreach (var i in k)
{
Console.WriteLine(i.ism);
}
Console.ReadKey();
}
}
42.
class Tadbirkor
{
public int id { get; set; }
public string ism { get; set; }
public string familya { get; set; }
public string maxsulotturi { get; set; }
public string narxi { get; set; }
}
class Program
{
static void Main(string[] args)
{
List tadbirkor = new List()
{
new
Tadbirkor(){id=1,ism="Husanboy",familya="Allayorov",
maxsulotturi="daftar",narxi="5$"},
new
Tadbirkor(){id=2,ism="Inoyat",familya="Bobojonov",maxsulotturi="k
itob",narxi="10$"},
new
Tadbirkor(){id=3,ism="Gulom",familya="Komilov",maxsulotturi="ru
chka",narxi="10$"},
new
Tadbirkor(){id=4,ism="Gulchexra",familya="Allayorova",maxsulottur
i="qalam",narxi="13$"},
};
var k = tadbirkor.Where(n => n.maxsulotturi == "daftar" &&
n.narxi == "5$");
foreach (var i in k)
{
Console.WriteLine(i.ism);
}
Console.ReadKey();
}
}
43.
class Tadbirkor
{
public int id { get; set; }
public string ism { get; set; }
public string familya { get; set; }
public string maxsulotturi { get; set; }
public string narxi { get; set; }
}
class Program
{
static void Main(string[] args)
{
List tadbirkor = new List()
{
new
Tadbirkor(){id=1,ism="Husanboy",familya="Allayorov",
maxsulotturi="daftar",narxi="5$"},
new
Tadbirkor(){id=2,ism="Alisher",familya="Bobojonov",maxsulotturi="
kitob",narxi="10$"},
new
Tadbirkor(){id=3,ism="Gulom",familya="Komilov",maxsulotturi="ru
chka",narxi="10$"},
new
Tadbirkor(){id=4,ism="Gulchexra",familya="Allayorova",maxsulottur
i="qalam",narxi="13$"},
};
var k = tadbirkor.Where(n => n.maxsulotturi == "kitob" &&
n.ism=="Alisher");
foreach (var i in k)
{
Console.WriteLine(i.ism);
}
Console.ReadKey();
}
}
Do'stlaringiz bilan baham: |