Expression.Constant Method (Object)
Assembly: System.Core (in System.Core.dll)
'Declaration Public Shared Function Constant ( _ value As Object _ ) As ConstantExpression
The following code example shows how to create an expression that represents a constant value.
' Add the following directive to your file: ' Imports System.Linq.Expressions ' This expression represents a constant value. Dim constantExpr As Expression = Expression.Constant(5.5) ' Print the expression. outputBlock.Text &= constantExpr.ToString() & vbCrLf ' You can also use variables. Dim num As Double = 3.5 constantExpr = Expression.Constant(num) outputBlock.Text &= constantExpr.ToString() & vbCrLf ' This code example produces the following output: ' ' 5.5 ' 3.5
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.