If I want a method that returns the default value of a given type and the method is generic I can return a default value like so:
public static T GetDefaultValue()
{
return default(T);
}
Can I do something similar in case I have the type only as a System.Type
object?
public static object GetDefaultValue(Type type)
{
//???
}