blah blah blah is here! blah blah » Close

0
votes
2 answers

How to create a C# string ENUM which returns string instead of int?

I would like to have string enum, so in my colling class I could use somethink like this: [code] Class1.Status.Failure [/code] The return string should be "S". The enum declaration is as following: [code] class Class1 ...

0
votes
1 answers

Can an enum be passed a string and pass back a string?

I need a enum where I pass in "IBM" and it passes back "I.B.M", etc.. Is this possible?

1
votes
1 answers

foreach trough an enum sort by name not by value

Hellow I couldn't find a search function so I do not know if my question's allready answered I can step trough a nummerated enum like: [code] public enum myEnum { STATUS_A = 2, STATUS_B = ...

2
votes
2 answers

Converting a string to respective enum value

This may be an obvious question, but: How do you convert a string representation of an enum value in to the respective value? For example: [code] public enum TestEnum : byte { FirstValue = 1, SecondValue = 2 } static void ...

Feedback