A
almurph
Hi,
Hope that you can help me please. I'm trying to implement a simple
collection property using ArrayList as an indexer. i want this to be
pretty generic
However I'm having difficulty with the conversions. I know that
System.Collection.ArrayList accepts and returns most of it's members as
objects but it's giving an error message of:
"Cannot implicitly convert type 'string' to
'System.Collections.ArrayList
Can anyone please help me please?
Thanks,
al
***** CODE AS FOLLOWS *****
public class collExample
{
private System.Collections.ArrayList AL = new
System.Collections.ArrayList();
public System.Collections.ArrayList this[int idx]
{
get
{
return AL[idx];
}
set
{
AL[idx] = value;
}
}
}// end collExample
Hope that you can help me please. I'm trying to implement a simple
collection property using ArrayList as an indexer. i want this to be
pretty generic
However I'm having difficulty with the conversions. I know that
System.Collection.ArrayList accepts and returns most of it's members as
objects but it's giving an error message of:
"Cannot implicitly convert type 'string' to
'System.Collections.ArrayList
Can anyone please help me please?
Thanks,
al
***** CODE AS FOLLOWS *****
public class collExample
{
private System.Collections.ArrayList AL = new
System.Collections.ArrayList();
public System.Collections.ArrayList this[int idx]
{
get
{
return AL[idx];
}
set
{
AL[idx] = value;
}
}
}// end collExample