Beispiel #1
0
 public void SetInfo()
 {
     for (int i = 0; i < 30; i++)
     {
         WeatherParametersDay day = new WeatherParametersDay();
         june[i] = day;
         day.Setter();
     }
 }
Beispiel #2
0
 public void SetFileInfo()
 {
     using (var sr = new StreamReader("weather.txt"))
     {
         var lines = File.ReadAllLines("weather.txt").Where(arg => !string.IsNullOrWhiteSpace(arg));
         sr.Close();
         File.WriteAllLines("weather.txt", lines);
         for (int i = 0; i < 30; i++)
         {
             WeatherParametersDay day = new WeatherParametersDay();
             using (var sread = new StreamReader("weather.txt"))
             {
                 june[i] = day;
                 int l = i;
                 day.SetFromFile(sread, l);
             }
         }
     }
 }