Timeline for Method that returns description attribute of enum value
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
S May 28, 2019 at 6:04 | history | suggested | sclarke81 | CC BY-SA 4.0 |
Make the C#6 version return a value if the description isn't present.
|
May 28, 2019 at 6:02 | review | Suggested edits | |||
S May 28, 2019 at 6:04 | |||||
Apr 25, 2019 at 9:24 | comment | added | t3chb0t | @sclarke81 yes, this totaly makes sense! | |
Apr 25, 2019 at 8:57 | comment | added | sclarke81 |
I think your C# 6 example has different behaviour; it returns null if the description isn't present. How about adding ?? value.ToString() to the end?
|
|
Aug 9, 2018 at 4:00 | review | Suggested edits | |||
Aug 9, 2018 at 6:02 | |||||
Mar 16, 2017 at 21:26 | vote | accept | Sam | ||
Mar 16, 2017 at 21:02 | history | answered | t3chb0t | CC BY-SA 3.0 |