Quantcast
Channel: User Peter - Reinstate Monica - Stack Overflow
Viewing all articles
Browse latest Browse all 223

Comment by Peter - Reinstate Monica on How can i convert IEnumerable into single value properties

$
0
0
@Magnus Exactly. For a set of "properties" (in the general sense, i.e., data) of the same type -- here: string -- it makes more sense to have a dictionary indexed with a suitable enum. This makes loops without reflection trivial. One may even opt for an enum enumerating every field, regardless of type, and have a dictionary with objects or some general custom class in it; that is suitable for loops that perform operations that are valid for all of them, e.g. toString (to hold them in GUI widgets) or store them somewhere etc..

Viewing all articles
Browse latest Browse all 223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>