c# create default instance of type

68

c# create default instance of type -

public object GetDefaultValue(Type type)
{
    return type.IsValueType ? Activator.CreateInstance(type) : null;
} 

Comments

Submit
0 Comments