I have a Enum
Public Enum MyEnum
<StringValue("Bla Bla")> _
BlaBla
<StringValue("bbble bbble")> _
BleBle
End Enum
I did an extension method (GetStringValue) that takes an Enum
and returns the value of the StringValueAttribute
, if any.
I can do Dim sValue = MyEnum.BlaBla.GetStringValue()
Now, I want an "extension" method that returns to me all the Enum Values as a list of strings.
I want to apply it like this: MyEnum.GetStringValues()
Is it possible?