Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

LINQ - Order by in C#

Example:
  1. using System;
  2. using System.Linq;
  3. using System.Xml.Linq;
  4.  
  5. namespace ForgetCode
  6. {
  7. public class MainClass
  8. {
  9. public static void Main()
  10. {
  11. dat customers = new dat(@"c:\data.mdf");
  12.  
  13. var queryLondonCustomers3 =
  14. from cust in customers
  15. where cust.City == "London"
  16. orderby cust.Name ascending
  17. select cust;
  18. }
  19. }
  20. }