C# Reflection Enum Option To Constant Value
Posted
by Andrew Florko
on Stack Overflow
See other posts from Stack Overflow
or by Andrew Florko
Published on 2010-05-18T11:48:05Z
Indexed on
2010/05/18
11:50 UTC
Read the original article
Hit count: 173
c#
|reflection
I have the code that reflects enum (DictionaryType) option to Guid in very straight-forward way
if (dictionaryType == DictionaryType.RegionType)
return Consts.DictionaryTypeId.RegionType;
if (dictionaryType == DictionaryType.Nationality)
return Consts.DictionaryTypeId.Nationality;
Please, suggest me the best way to reflect Enum option to static readonly guid value.
Thank you in advance
© Stack Overflow or respective owner