List
List
typeOfImage.Add(myImages.type);
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted Jun 23, 2012, 2:13 AM
I'm not sure, why you want to store the object the values into another list.
First iterate the list collection
Get all the properties in assign to propertyinfos varaible Iterate the propertyinfos collection to get the each property value.
foreach (images image in myimages)
{
PropertyInfo[] propertyInfos;
propertyInfos = typeof(image).GetProperties(BindingFlags.Public | BindingFlags.Static);
foreach (PropertyInfo propertyInfo in propertyInfos)
{
Console.WriteLine(propertyInfo.Name);
}
}
Hope this helps you.