CodePropertyReferenceExpression クラス
アセンブリ: System (system.dll 内)

<SerializableAttribute> _ <ComVisibleAttribute(True)> _ <ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _ Public Class CodePropertyReferenceExpression Inherits CodeExpression
[SerializableAttribute] [ComVisibleAttribute(true)] [ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] public class CodePropertyReferenceExpression : CodeExpression
[SerializableAttribute] [ComVisibleAttribute(true)] [ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] public ref class CodePropertyReferenceExpression : public CodeExpression

CodePropertyReferenceExpression を使用して、プロパティの値への参照を表すことができます。
TargetObject プロパティは、参照するプロパティを格納したオブジェクトを指定します。PropertyName プロパティは、参照するプロパティの名前を指定します。
このオブジェクトには、参照が get または set で使用されているかどうかを示すプロパティはありません。プロパティの参照を代入ステートメントの左辺、つまり代入先に記述した場合、これは set となります。

CodePropertyReferenceExpression を使用してプロパティを参照する方法については、次のコード例を参照してください。
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
CodePropertyReferenceExpression propertyRef1 = new CodePropertyReferenceExpression(new CodeThisReferenceExpression(), "TestProperty"); // A C# code generator produces the following source code for the preceeding example code: // this.TestProperty
CodePropertyReferenceExpression^ propertyRef1 = gcnew CodePropertyReferenceExpression( gcnew CodeThisReferenceExpression,"TestProperty" ); // A C# code generator produces the following source code for the preceeding example code: // this.TestProperty

System.CodeDom.CodeObject
System.CodeDom.CodeExpression
System.CodeDom.CodePropertyReferenceExpression


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- CodePropertyReferenceExpression クラスのページへのリンク