Is there a simple way to initialize a dictionary that is a property like in .Net 3.5 or do I need to add the elements in the class's constructor?
My aim is to have a static map of codes mapping to string representation.
Yes, you'll need to initialize your Dictionary
at class constructor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With