System.Linq.Expressions.Expression.Default C# (CSharp) Method

Default() public static method

Creates a DefaultExpression that has the Type property set to the specified type.
public static Default ( Type type ) : DefaultExpression
type Type A to set the property equal to.
return DefaultExpression
        public static DefaultExpression Default(Type type)
        {
            ContractUtils.RequiresNotNull(type, nameof(type));
            TypeUtils.ValidateType(type, nameof(type));
            if (type.IsByRef)
            {
                throw Error.TypeMustNotBeByRef(nameof(type));
            }

            if (type.IsPointer)
            {
                throw Error.TypeMustNotBePointer(nameof(type));
            }

            return new DefaultExpression(type);
        }
    }
Expression