Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Track
- {
- public String Name { get; set; }
- public Double Duration;
- public Boolean IsRemix;
- public override string ToString()
- {
- if (IsRemix) return Name + "(Remix) " + Duration;
- return Name + " " + Duration;
- }
- }
- class Album :List<Track>
- {
- public Album SortByAlphabet()
- {
- return new Album().OrderBy(x=>x.Name);
- }
- }
- class Album :List<Track>
- {
- public Album SortByAlphabet()
- {
- return this.OrderBy(x=>x.Name).ToList();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement