I am writing a method that takes a generic type and I am trying to create an instance of it.
public static class Grid
{
public static T TestGeneric<T>()
where T : new()
{
T Result = new T();
return Result;
}
}
However, this is returning null. My object inheritance is pretty complex and it would take me awhile to break it apart to see whether there is something there causing it. In general, what would cause the new T() function to return null?