Typed array list
i am trying to create aclass that will extends ArrayList and will be typed,like this:
public class TypedArrayList : ArrayList
{
private Type data_type;
public TypedArrayList(string type_name)
{
data_type = Type.GetType("Object");
data_type.GetType();
}
public data_type this[int index]
{
get
{
return this[index];
}
set
{
this[index] = value;
}
}
}
and i can't do you have any idea on how i can create one function that will return each time adifferent type like this:
public data_type this[int index]
when data_type can be changed.
this way it doesn't work since the compiler says that data_type is a filed not a type
itzik
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

shimtannyRank #3,312 · 434 pointsPosted Feb 17, 2005, 8:41 AM EST
rocksrabbit5 pointsPosted Feb 17, 2005, 9:18 AM EST
shimtannyRank #3,312 · 434 pointsPosted Feb 17, 2005, 9:32 AM EST