c# - Iterating through object types in a list of parent type -


i trying iterate through list of objects , change ones match particular type. current code looks this. (platform extension of entity, , entities list of type entity)

foreach (platform p in entities.oftype<platform>) { p.dostuff() } 

i getting error "foreach cannot opperate on 'method group'" anyone's help. :)

alright :

foreach (platform p in entities.oftype<platform>())  //will loop through object of platform type in entites.oftype<platform>() 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -