List
List
typeOfImage.Add(myImages.type);
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Posted Jun 22, 2012, 10:13 PM EDT
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.