CodeDirectionExpression 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
참조 방향 표시기와 함께 메서드 호출 매개 변수로 사용되는 식을 나타냅니다.
public ref class CodeDirectionExpression : System::CodeDom::CodeExpression
public class CodeDirectionExpression : System.CodeDom.CodeExpression
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class CodeDirectionExpression : System.CodeDom.CodeExpression
type CodeDirectionExpression = class
inherit CodeExpression
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type CodeDirectionExpression = class
inherit CodeExpression
Public Class CodeDirectionExpression
Inherits CodeExpression
- 상속
- 특성
예제
다음 예제에서는 메서드 매개 변수로 전달할 식에 CodeDirectionExpression 대 한 필드 방향 한정자를 지정 하는 데 사용 하는 방법을 보여 줍니다.
// Declares a parameter passed by reference using a CodeDirectionExpression.
CodeDirectionExpression param1 = new CodeDirectionExpression(FieldDirection.Ref, new CodeFieldReferenceExpression( new CodeThisReferenceExpression(), "TestParameter" ));
// Invokes a method on this named TestMethod using the direction expression as a parameter.
CodeMethodInvokeExpression methodInvoke1 = new CodeMethodInvokeExpression(new CodeThisReferenceExpression(), "TestMethod", param1 );
// A C# code generator produces the following source code for the preceeding example code:
// this.TestMethod(ref TestParameter);
' 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")
설명
CodeDirectionExpression 는 메서드에 전달된 매개 변수와 매개 변수의 참조 방향을 나타낼 수 있습니다.
이 속성은 Expression 방향을 한정할 식을 나타냅니다. 이 속성은 Direction 열거형 값 중 하나를 사용하여 매개 변수의 FieldDirection 방향을 나타냅니다.
메모
CodeDirectionExpression 는 메서드 호출 매개 변수로 사용되며 메서드를 선언할 때 사용하면 안 됩니다.
생성자
| Name | Description |
|---|---|
| CodeDirectionExpression() |
CodeDirectionExpression 클래스의 새 인스턴스를 초기화합니다. |
| CodeDirectionExpression(FieldDirection, CodeExpression) |
지정된 필드 방향 및 식을 사용하여 클래스의 CodeDirectionExpression 새 인스턴스를 초기화합니다. |
속성
| Name | Description |
|---|---|
| Direction |
이 방향 식의 필드 방향을 가져오거나 설정합니다. |
| Expression |
나타낼 코드 식을 가져오거나 설정합니다. |
| UserData |
현재 개체에 대한 사용자 정의 데이터를 가져옵니다. (다음에서 상속됨 CodeObject) |
메서드
| Name | Description |
|---|---|
| Equals(Object) |
지정된 개체가 현재 개체와 같은지 여부를 확인합니다. (다음에서 상속됨 Object) |
| GetHashCode() |
기본 해시 함수로 사용됩니다. (다음에서 상속됨 Object) |
| GetType() |
현재 인스턴스의 Type 가져옵니다. (다음에서 상속됨 Object) |
| MemberwiseClone() |
현재 Object단순 복사본을 만듭니다. (다음에서 상속됨 Object) |
| ToString() |
현재 개체를 나타내는 문자열을 반환합니다. (다음에서 상속됨 Object) |