Arrays store System.Object type. When you add a new object or an item of promotive type they will be upcasted to System.Object. This is the line inside ArrayList which adds the new item: public virtual int Add(object value); Use Code DEfinition Window in VS 2005 to see what's inside ArrayList class. In order to access properties you need to down cast the array item you want to acces like: Console.WriteLine(((ServerInfo)myServerArrayList[0]).PropertyName); You would have the same problem if you tried: ArrayList myList = new ArrayList(); int int1 = 1; myList.Add(int1); int int2 = 2; myList.Add(int2); int int3 = myList[0]; // oops error - cannot convert type 'object' to 'int' int int3 = (int)myList[0]; // this will do the trick Happy coding ...
B
bes2005
@bes2005