Esempio n. 1
0
        static void Main(string[] args)
        {
            /* int[] numbers = { 7, 99, 45, 53 };
             * var res = from n in numbers         // querying a collection
             *         where n > 50
             *         orderby n
             *         select n.ToString();
             *
             * foreach(var item in res)
             * {
             *   Console.WriteLine(item);
             * }*/

            IEnumerable <string> queryname = from stud in Student.GetStudDetails()
                                             where stud.Name.StartsWith("N") // stud.ID==105
                                             select stud.Name;

            foreach (var s in queryname)
            {
                Console.Write(s + " ");
            }


            Console.Read();
        }