class myIndexerGeneric
{
private T[] indxr = new T[10];
public T this[int i]
{
get { return indxr[i]; }
set { indxr[i] = value; }
}
}
private void TestIndexer()
{
ArrayList a = new ArrayList();
a.Add("TextIn");
myIndexerGeneric<ArrayList> g = new myIndexerGeneric<ArrayList>();
g[0] = a;
ArrayList b = new ArrayList();
b = g[0];
}
No comments:
Post a Comment