2
Answers

Help with Enum...

Space Ghost

Space Ghost

14y
2.3k
1

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)