Not totally sure what you are asking here, except that you are extending the
List<string>
class and want to basically have 3 lists in one.
I think if this is going to be used in other applications you should extend the
List<T>
class to support generic types.
public MainDB : List<string>
{
private List<string> m_X;
private List<string> m_Y;
public List<string> X {
get {
return m_X;
}
}
public List<string> Y {
get {
return m_Y;
}
}
public MainDB():base()
{
m_X = new List<string>();
m_Y = new List<string>();
}
public new void Add(string Value)
{
m_X.Add(Value);
m_Y.Add(Value);
base.Add(Value);
}
}