Ejemplo n.º 1
0
 private static void ReadCsvFile(Youtube youtube)
 {
     using (var reader = new StreamReader(filePath))
     {
         while (!reader.EndOfStream)
         {
             var line = CleanFileData(reader.ReadLine());
             var data = line.Split(',');
             try
             {
                 YoutubeChannel channel = new YoutubeChannel(
                     data[2],
                     Convert.ToInt64(data[3]),
                     Convert.ToInt64(data[5]),
                     Convert.ToInt64(data[4])
                     );
                 youtube.AddChannel(channel);
             }
             catch
             {
                 //data exception
             }
         }
     }
 }
Ejemplo n.º 2
0
 public void AddChannel(YoutubeChannel NewYoutuber)
 {
     youtubeChannel[NewYoutuber.channelName] = NewYoutuber;
 }