csharp create default instance of type
Code Example - csharp create default instance of type
public object GetDefaultValue(Type type)
{
return type.IsValueType ? Activator.CreateInstance(type) : null;
}