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
Post a Comment