Export (0) Print
Expand All

Expression.Constant Method (Object)

Creates a ConstantExpression that has the Value property set to the specified value.

Namespace:  System.Linq.Expressions
Assembly:  System.Core (in System.Core.dll)

public static ConstantExpression Constant(
	Object value
)

Parameters

value
Type: System.Object

An Object to set the Value property equal to.

Return Value

Type: System.Linq.Expressions.ConstantExpression
A ConstantExpression that has the NodeType property equal to Constant and the Value property set to the specified value.

The Type property of the resulting ConstantExpression is equal to the type of value. If value is null, Type is equal to Object.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5

Community Additions

ADD
Show:
© 2015 Microsoft