Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. class Track
  2. {
  3. public String Name { get; set; }
  4. public Double Duration;
  5. public Boolean IsRemix;
  6.  
  7. public override string ToString()
  8. {
  9. if (IsRemix) return Name + "(Remix) " + Duration;
  10. return Name + " " + Duration;
  11. }
  12. }
  13.  
  14. class Album :List<Track>
  15. {
  16. public Album SortByAlphabet()
  17. {
  18. return new Album().OrderBy(x=>x.Name);
  19. }
  20. }
  21.  
  22. class Album :List<Track>
  23. {
  24. public Album SortByAlphabet()
  25. {
  26. return this.OrderBy(x=>x.Name).ToList();
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement