You can just inherit from it:
public class State : List<string>
{}
That way, you have the full interface that List<string>
offers, with your own type name. And then you can go, and add your own methods.
If you want a bit more control over it, e.g. to hide some methods or to change how they work, you could also create a wrapper class that implements IList<string>
and just delegates most of its method to a private List<string>
instance. E.g. like this:
public class State : IList<string>
{
private List<string> internalList = new List<string>();
public string this[int index]
{
get { return internalList[index]; }
set { internalList[index] = value; }
}
public void Add (string item)
{
internalList.Add(item);
}
// etc. for the other IList<T> members
}