CodeDirectionExpression Class
Represents an expression used as a method invoke parameter along with a reference direction indicator.
Assembly: System (in System.dll)
CodeDirectionExpression can represent a parameter passed to a method and the reference direction of the parameter.
The Expression property indicates the expression to qualify with a direction. The Direction property indicates the direction of the parameter using one of the FieldDirection enumeration values.
Note: |
|---|
CodeDirectionExpression is intended to be used as a method invoke parameter, and should not be used when declaring methods. |
The following example demonstrates use of a CodeDirectionExpression to specify a field direction modifier for an expression to pass as a method parameter.
' Declares a parameter passed by reference using a CodeDirectionExpression. Dim param1 As New CodeDirectionExpression(FieldDirection.Ref, New CodeFieldReferenceExpression(New CodeThisReferenceExpression(), "TestParameter")) ' Invokes a method on this named TestMethod using the direction expression as a parameter. Dim methodInvoke1 As New CodeMethodInvokeExpression(New CodeThisReferenceExpression(), "TestMethod", param1) ' A Visual Basic code generator produces the following source code for the preceeding example code: ' Me.TestMethod("TestParameter")
System.CodeDom.CodeObject
System.CodeDom.CodeExpression
System.CodeDom.CodeDirectionExpression
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
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.
Note: