using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LISTCOLLECTIONS
{
class Program
static void Main(string[] args)
List<Order> orderList = datalist();
var orders = from o in orderList
select o;
foreach (var o in orders)
Console.WriteLine("Order ID is: {0}", o.OrderID.ToString());
Console.ReadLine();
}
class Order
{ public int OrderID { get; set; } }
static private List<Order> datalist()
List<Order> orderList = new List<Order>();
Order o1 = new Order();
o1.OrderID = 123;
return orderList;