Help with Classes RRS feed

  • General discussion

  • I have a class that I want to hold 4 identical objects.  I want to be able to call one of the objects like this:


    And I want to be able to set properties like this

    sampleClass(1).property = "foo"

    I tried using a collection but I can't set a property after I create it.  Can someone help me out.  Is there any articles you know of that describe this.  thanks
    Wednesday, June 25, 2008 9:35 PM

All replies

  • i don't know what you are trying to say but i guess this will help you

    1. try to create the IList of your class like this

    IList<myClassName> something = new List<myClassName>();  

    take a look at this

    i don't know if i addressed your issue right or not
    but you can tell what you actually want

    l33t I was lost but then i found MSDN !
    Thursday, June 26, 2008 8:23 PM