Saturday, October 5, 2013

I need to do a foreach item on a class

Your class appears to be a single object and not a collection. You can only do foreach on a collection.


You can create a List<MainSettings> to contain a list of all of the settings and then do foreach through that. Depending on how these will be used other collection classes may be better.


--Rob


No comments:

Post a Comment