как вариант могу предложить такой код:
class Program
{
class Country
{
private int _id = -1;
private string _name = String.Empty;
private string _description = String.Empty;
public int Id
{
get { return _id; }
}
public string Name
{
get { return _name; }
}
public string Description
{
get { return _description; }
}
public Country(int id, string name, string description)
{
_id = id;
_name = name;
_description = description;
}
}
class Countries
{
public static readonly Country Country1 = new Country(1, "country1", "it is country1");
public static readonly Country Country2 = new Country(2, "country2", "it is country2");
public static readonly Country Country3 = new Country(3, "country3", "it is country3");
}
static void Main(string[] args)
{
Console.WriteLine("{0} - {1} - {2}", Countries.Country1.Id, Countries.Country1.Name, Countries.Country1.Description);
Console.WriteLine("{0} - {1} - {2}", Countries.Country2.Id, Countries.Country2.Name, Countries.Country2.Description);
Console.WriteLine("{0} - {1} - {2}", Countries.Country3.Id, Countries.Country3.Name, Countries.Country3.Description);
Console.ReadKey();
}
}
... << RSDN@Home 1.1.4 stable SR1 rev. 568>>