How do you determine whether a generic type argument is of a given type? This is what I have, but it seems hacky to instantiate the type just to test its type.
public void LogAllTheThings<T>()
where T : class, new()
{
if (new T() is Widget)
{
// Log widget-specific fields
}
}