Share via


CodeFieldReferenceExpression 클래스

정의

필드에 대한 참조를 나타냅니다.

public ref class CodeFieldReferenceExpression : System::CodeDom::CodeExpression
public class CodeFieldReferenceExpression : System.CodeDom.CodeExpression
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class CodeFieldReferenceExpression : System.CodeDom.CodeExpression
type CodeFieldReferenceExpression = class
    inherit CodeExpression
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type CodeFieldReferenceExpression = class
    inherit CodeExpression
Public Class CodeFieldReferenceExpression
Inherits CodeExpression
상속
CodeFieldReferenceExpression
특성

예제

다음 예제에서는 를 사용하여 CodeFieldReferenceExpression 필드를 참조하는 방법을 보여 줍니다.

CodeFieldReferenceExpression^ fieldRef1 = gcnew CodeFieldReferenceExpression( gcnew CodeThisReferenceExpression,"TestField" );

// A C# code generator produces the following source code for the preceeding example code:
//    this.TestField
CodeFieldReferenceExpression fieldRef1 =
    new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "TestField");

// A C# code generator produces the following source code for the preceeding example code:

//    this.TestField
Dim fieldRef1 As New CodeFieldReferenceExpression(New CodeThisReferenceExpression(), "TestField")
' A Visual Basic code generator produces the following source code for the preceeding example code:

'	Me.TestField

설명

CodeFieldReferenceExpression 필드에 대한 참조를 나타내는 데 사용할 수 있습니다.

속성은 TargetObject 필드를 포함하는 개체를 지정합니다. 속성은 FieldName 참조할 필드의 이름을 지정합니다.

생성자

CodeFieldReferenceExpression()

CodeFieldReferenceExpression 클래스의 새 인스턴스를 초기화합니다.

CodeFieldReferenceExpression(CodeExpression, String)

지정된 대상 개체와 필드 이름을 사용하여 CodeFieldReferenceExpression 클래스의 새 인스턴스를 초기화합니다.

속성

FieldName

참조할 필드의 이름을 가져오거나 설정합니다.

TargetObject

참조할 필드가 들어 있는 개체를 가져오거나 설정합니다.

UserData

현재 개체에 대해 사용자 정의 가능한 데이터를 가져옵니다.

(다음에서 상속됨 CodeObject)

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상