Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private enum Combovalues
- {
- BezeichnungA = 1,
- BezeichnungB = 4,
- BezeichnungC = 60
- }
- public void SomeMethod()
- {
- Combovalues combovalue = Combovalues.BezeichnungB;
- int comboValue = (int)combovalue;
- string combovalueName = combovalue.ToString();
- }
- public Combovalues GetCombovalue(int i)
- {
- string name = Enum.GetName(typeof (Combovalues), i);
- if (null == name) throw new Exception();
- return (Combovalues)Enum.Parse(typeof (Combovalues), name);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement