Advertisement
Guest User

Untitled

a guest
May 3rd, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. List<Class1> YourList = new List<Class1>();
  2. YourList.OrderByDescending(x => x.data.Date).ThenByDescending(x => x.data.TimeOfDay).ToList(); // sortowanie listy dat malejaco
  3. YourList.OrderBy(x => x.data.Date).ThenBy(x => x.data.TimeOfDay).ToList(); //sortowanie rosnaco
  4.  
  5.  
  6. DateTime date1 = new DateTime(2009, 8, 1, 0, 0, 0);
  7. if (date1 < DateTime.Now)
  8. Console.WriteLine("Less than the current time!");
  9.  
  10.  
  11. string userInput = "";
  12. DateTime userDate = DateTime.ParseExact(userInput, "dd-MM-yyyy", null);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement