Share via


CodePropertyReferenceExpression Sınıf

Tanım

Bir özelliğin değerine başvuruyu temsil eder.

public ref class CodePropertyReferenceExpression : System::CodeDom::CodeExpression
public class CodePropertyReferenceExpression : System.CodeDom.CodeExpression
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class CodePropertyReferenceExpression : System.CodeDom.CodeExpression
type CodePropertyReferenceExpression = class
    inherit CodeExpression
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type CodePropertyReferenceExpression = class
    inherit CodeExpression
Public Class CodePropertyReferenceExpression
Inherits CodeExpression
Devralma
CodePropertyReferenceExpression
Öznitelikler

Örnekler

Aşağıdaki örnek kod, bir özelliğe başvurmak için bir CodePropertyReferenceExpression kullanımını gösterir.

CodePropertyReferenceExpression^ propertyRef1 = gcnew CodePropertyReferenceExpression( gcnew CodeThisReferenceExpression,"TestProperty" );

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

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

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

'	Me.TestProperty

Açıklamalar

CodePropertyReferenceExpression bir özelliğin değerine yapılan başvuruyu temsil etmek için kullanılabilir.

TargetObject özelliği, başvurulacak özelliği içeren nesneyi belirtir. PropertyName özelliği, başvurulacak özelliğin adını belirtir.

Bu nesnenin, başvurunun veya setiçinde kullanılıp kullanılmadığını belirten bir get özelliği yok. Özellik başvurusu sol tarafta, atama deyiminin tarafında atanmış olarak gerçekleşirse, bu bir setolur.

Oluşturucular

CodePropertyReferenceExpression()

CodePropertyReferenceExpression sınıfının yeni bir örneğini başlatır.

CodePropertyReferenceExpression(CodeExpression, String)

Belirtilen hedef nesne ve özellik adını kullanarak sınıfın yeni bir örneğini CodePropertyReferenceExpression başlatır.

Özellikler

PropertyName

Başvurulacak özelliğin adını alır veya ayarlar.

TargetObject

Başvurulacak özelliğini içeren nesneyi alır veya ayarlar.

UserData

Geçerli nesne için kullanıcı tarafından tanımlanabilir verileri alır.

(Devralındığı yer: CodeObject)

Yöntemler

Equals(Object)

Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.

(Devralındığı yer: Object)
GetHashCode()

Varsayılan karma işlevi işlevi görür.

(Devralındığı yer: Object)
GetType()

Type Geçerli örneğini alır.

(Devralındığı yer: Object)
MemberwiseClone()

Geçerli Objectöğesinin sığ bir kopyasını oluşturur.

(Devralındığı yer: Object)
ToString()

Geçerli nesneyi temsil eden dizeyi döndürür.

(Devralındığı yer: Object)

Şunlara uygulanır