nikhilk/scriptsharp — pull request #377 by andekande (2013-06-07 11:25:56+00:00)
Title: implement Enum.GetName() 

if Enums are not decorated with [ScriptConstants(UseNames=true)] one
might need the Keyname to the Enumvalue

there is a workaround in C# which doesn't seem quiet obvious because it makes use of compiler specialities:

```csharp
public enum designtype
{
Panel = 0,
Label = 1,
TextBox = 2
}

designtype dtype = designtype.TextBox;
string dtypestring = "";

Dictionary items = ((Dictionary)((object)typeof(designtype)));
foreach (KeyValuePair kvp in items)
{
if ((int)items[kvp.Key] == (int)dtype)
dtypestring = kvp.Key;
}
```

now the same is achived with .Net compatibility, whereas dtype could be int (javascript constant) as well:
```csharp
Enum.GetName(typeof(designtype), dtype);
```