静态方法List

 public class Country
    {
        public static List<Country> CountryList = new List<Country> { 
            new Country{Name = "US"},
            new Country{Name = "Canada"},
            new Country{Name = "Mexico"}
        };

        public string Name { get; set; }
    }
原文地址:https://www.cnblogs.com/hellolong/p/3977138.html