Re: ArrayList Question
- From: not_a_commie <notacommie@xxxxxxxxx>
- Date: Mon, 31 Mar 2008 07:28:28 -0700 (PDT)
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()?
- Follow-Ups:
- Re: ArrayList Question
- From: Marc Gravell
- Re: ArrayList Question
- From: Hoop
- Re: ArrayList Question
- References:
- ArrayList Question
- From: Hoop
- ArrayList Question
- Prev by Date: Re: Value Types and Reference Types
- Next by Date: Re: ArrayList Question
- Previous by thread: ArrayList Question
- Next by thread: Re: ArrayList Question
- Index(es):