convert generic to type c#

C#
(SomeClass)Convert.ChangeType(T, typeof(SomeClass));
Source

Also in C#: