The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
Expression::Constant Method (Object^)
.NET Framework (current version)
Creates a ConstantExpression that has the Value property set to the specified value.
Assembly: System.Core (in System.Core.dll)
Parameters
- value
- Type: System::Object^
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.
To represent null, you can also use the Constant(Object^, Type^) method, with which you can explicitly specify the type.
Universal Windows Platform
Available since 8
.NET Framework
Available since 3.5
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 3.5
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Show: