How Can i Access This Code?
-
Thanks for your read... Well... Somethimes define propery in user class for example... public sealed myClass { private int _myValue; public int MyValue { get { return this._myValue; } set { this.myValue = value; } } } Well... can i acccess arraylist in user class ?? for example... public sealed myClass { private ArrayList _arMyList; public ArrayList arMyList { } } and how can i define get & set property ? just same general rules ???
.. knodark
-
Thanks for your read... Well... Somethimes define propery in user class for example... public sealed myClass { private int _myValue; public int MyValue { get { return this._myValue; } set { this.myValue = value; } } } Well... can i acccess arraylist in user class ?? for example... public sealed myClass { private ArrayList _arMyList; public ArrayList arMyList { } } and how can i define get & set property ? just same general rules ???
.. knodark
Did you try ? Yes, it works the same way. Note though, because an arraylist is a reference property, if you define a get, someone can do myClass.myArray.Clear() and it's cleared in your class instance.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )