Answers for "c# create default instance of type"

C#
0

c# create default instance of type

public object GetDefaultValue(Type type)
{
    return type.IsValueType ? Activator.CreateInstance(type) : null;
}
Posted by: Guest on September-15-2020

Code answers related to "c# create default instance of type"

C# Answers by Framework

Browse Popular Code Answers by Language