c# generic type converter code example
Example 1: convert generic to type c#
(SomeClass)Convert.ChangeType(T, typeof(SomeClass));
Example 2: c# generic return type in interface
public interface IExample
{
int GetInteger();
T GetAnything<T>();
}