コード例 #1
0
 public static Country FindCountryByAlpha2(string alpha2)
 {
     Country country = new Country();
     using (CountrySerializer ser = new CountrySerializer(@"C:\Users\Fishman\Desktop\C#\WeatherProc\WeatherProc\WeatherProc.Data\XMLs\Countries.xml"))
     {
         var list = ser.Deserialize();
         country = list.Countries.FirstOrDefault(c => c.Alpha2 == alpha2);
     }
     return country;
 }
コード例 #2
0
ファイル: LocationData.cs プロジェクト: aurumgold/weatherproc
 public LocationData()
 {
     Country = new Country();
     Location = new Location();
     Sun = new Sun();
 }