If I have a type parameter constraint new():
void Foo<T>() where T : new()
{
var t = new T();
}
Is it true that new T() will internally use the Activator.CreateInstance method (i.e. reflection)?
If I have a type parameter constraint new():
void Foo<T>() where T : new()
{
var t = new T();
}
Is it true that new T() will internally use the Activator.CreateInstance method (i.e. reflection)?