Space Ghost

Space Ghost

  • NA
  • 45
  • 0

Help with Enum...

Apr 8 2010 4:02 PM

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)