System.TypeExtensions.DefaultValue C# (CSharp) Method

DefaultValue() public static method

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