Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace HVTest
- {
- using System;
- using System.Collections.Generic;
- class Program
- {
- public static WeatherData _weatherData;
- static void Main(string[] args)
- {
- _weatherData = new WeatherData();
- _weatherData.Weathers.Add(new Weather() { Name = "First" });
- _weatherData.Weathers.Add(new Weather() { Name = "Second" });
- foreach (var item in _weatherData.Weathers)
- {
- Console.WriteLine(item.Name);
- }
- Console.Read();
- }
- }
- class WeatherData
- {
- public WeatherData()
- {
- Weathers = new List<Weather>();
- }
- public List<Weather> Weathers { get; set; }
- }
- class Weather
- {
- public string Name { get; set; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment