2
Reply

Help with Enum...

Space Ghost

Space Ghost

Apr 8 2010 4:02 PM
2.3k

Can someone please give me a explenation of what this code below would do and explain how this works? I came across this example and do not even know where to start.
public T GetOne<T>(object o)
   
{
        T one = (T)Enum.Parse(typeof
(T), o.ToString());
        return
one;
    }
 
Thanks,

Answers (2)