This documentation is archived and is not being maintained.

ParameterExpression Class

Updated: October 2008

Represents a named parameter expression.

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

Public NotInheritable Class ParameterExpression _
	Inherits Expression
Dim instance As ParameterExpression

Use the Parameter factory method to create a ParameterExpression.

The value of the NodeType property of a ParameterExpression object is Parameter.

For example, assume that you have the following query:

companies.Where(Function(company) company.ToLower() = "coho winery" _
    OrElse company.Length > 16).OrderBy(Function(company) company)

In this case, company becomes a parameter expression. To construct an expression tree for this parameter, you can use the following code:

Dim pe As ParameterExpression = Expression.Parameter(GetType(String), "company")

You can find a complete example of using parameter expressions in expression trees in How to: Use Expression Trees to Build Dynamic Queries.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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




October 2008

Added example.

Customer feedback.