Guest User

Untitled

a guest
Jun 25th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. List<List<string>> matrix = new List<List<string>>();
  2.  
  3. List<List<string>> matrix = new List<List<string>>();
  4.  
  5. List<List<string>> matrix = new List<List<string>>();
  6.  
  7. List<string> track = new List<string>();
  8. track.Add("2349");
  9. track.Add("The Prime Time of Your Life");
  10. // etc
  11. matrix.Add(track);
  12.  
  13. public class Track {
  14. public int TrackID { get; set; }
  15. public string Name { get; set; }
  16. public string Artist { get; set; }
  17. public string Album { get; set; }
  18. public int PlayCount { get; set; }
  19. public int SkipCount { get; set; }
  20. }
  21.  
  22. var trackList = new List<Track>();
  23.  
  24. trackList.add( new Track {
  25. TrackID = 1234,
  26. Name = "I'm Gonna Be (500 Miles)",
  27. Artist = "The Proclaimers",
  28. Album = "Finest",
  29. PlayCount = 10,
  30. SkipCount = 1
  31. });
  32.  
  33. Track firstTrack = trackList[0];
  34.  
  35. caspert,
  36.  
  37. Create a new class:
  38.  
  39. public class Track
  40. {
  41. public Track()
  42. {
  43.  
  44. }
  45.  
  46. public String TrackName { get; set;}
  47. public String Artist { get; set; }
  48. }
  49.  
  50. List<Track> tracks = new List<Track>();
  51. Track tempTrack = new Track();
  52. tempTrack.TrackName = "Consuming Fire";
  53. tempTrack.Artist = "Tim Hughes";
  54. tracks.Add(tempTracK);
Add Comment
Please, Sign In to add comment