I need to save a class with list of countries in statics for caching.
the data is built with
string shortName //Primary Key - (IL or UK for example)
int
why wont you make your own class?
class Country
{
public string shortName { get; set; } //Primary Key - (IL or UK for example)
public int ID { get; set; } //Unique - has no meaning, but needs to be saved
public string longName { get; set; } //(Israel or United Kingdom for example)
}
then just make another class, that will contain methods you need
class Countries
{
List countries = new List();
public void Add(Country c)
{
countries.Add(c);
}
public List getByShortName();
public List getById();
public List getAll();
}