c# - How to access properties of an object in a list? -


i trying take properties list of types , put them in list. not sure how iterate through list of objects gain access properties.

for example:

list<images> myimages = new list<images>();  list<string> typeofimage = new list<string>();  typeofimage.add(myimages.type); 

can me in this?

try this:

typeofimage = myimages.select(image => image.anypropertyyouneed).tolist(); 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -