Using reflection you can obtain the MemberInfo property,
then objtain property types, check if it implements ICollection and then
iterate...
Type MyType =Type.GetType("System.IO.BufferedStream");
PropertyInfo[] propInfoArray = MyType.GetProperties();
ICollection collection = null;
object obj = null;
foreach (PropertyInfo propInfo in propInfoArray )
{
if ( (obj = propInfo.GetValue(null, null)) is ICollection )
collection = (ICollection)obj;
}
Iterate through collection object
--
Vadym Stetsyak aka Vadmyst
"jared lynch" <no******@developer.net> wrote in message
news:ej********************************@4ax.com...
I'm trying to write a class that will get all the properties of a
class and store it in xml file. So far I'm able to do this on a basic
class, meaning a class that has no array's or instances of other
classes within it, just some basic properties (ie. strings, ints, etc)
Does anyone have an idea of how i'd iterate through a classes property
if it's an arraylist to grab the properties within the arraylist as
well?