0

Help me what's wrong

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class linqsyntax { public string name { get;set;} public int age {get;set;} } class Program { static void Main(string[] args) { linqsyntax[] linqtest = { new linqsyntax() = { name = "shahid",age = 10 }, new linqsyntax() = { name = "jani",age = 15 }, new linqsyntax() = {name ="hacker",age = 17}, new linqsyntax() = {name = "propeahnal",age = 18}, new linqsyntax() = {name = "c# lover ",age =19}, new linqsyntax() = {name ="c#practice",age = 21}, }; var adultstudent from selectit in linqtest where selectit age >15 && age<20 select selectit; foreach (var showresult in linqtest ) { Console.WriteLine(showresult ); }

6th Apr 2021, 3:51 PM
Shahid Jani
Shahid Jani - avatar
1 Respuesta
0
Being specific about the problem invites more people to look over it and put this code in code playground and share the link here .
6th Apr 2021, 5:33 PM
Hima
Hima - avatar