Re: ArrayList Question



I think you should start with some books on C#. Get and Set don't
belong in function declarations.

Hoop wrote:
Hello,
I am trying to create a property to read and write strings into an
arrayList.
What I have is I create an arrrayList in my class,

ArrayList m_circuitNames = new ArrayList();

And now am trying to create a property to read and write the list,

public ArrayList CircuitName( int location)
{
get
{
return (ArrayList)m_circuitNames[location];
}

set
{
m_circuitNames.Insert(location, value);
}

}

However, once I add the location argument it does not compile anymore.
How to I correcly create a propery to insert and retrive strings from
an arrayList()?
.