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

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

CodePropertySetValueReferenceExpression は、プロパティ設定メソッドの宣言の中の、プロパティ設定メソッドの呼び出しの値引数を表します。
通常、プロパティ設定メソッドは、プロパティに割り当てられた値を割り当てまたは使用します。プロパティ設定メソッドの内部では、この値は、CodeDOM の中で CodePropertySetValueReferenceExpression によって表される暗黙的な変数によって表されます。

CodePropertySetValueReferenceExpression を使用して、プロパティの値設定ステートメント ブロックに渡される値引数を表す例を次に示します。
' Declares a type. Dim type1 As New CodeTypeDeclaration("Type1") ' Declares a constructor. Dim constructor1 As New CodeConstructor() constructor1.Attributes = MemberAttributes.Public type1.Members.Add(constructor1) ' Declares an integer field. Dim field1 As New CodeMemberField("System.Int32", "integerField") type1.Members.Add(field1) ' Declares a property. Dim property1 As New CodeMemberProperty() ' Declares a property get statement to return the value of the integer field. property1.GetStatements.Add(New CodeMethodReturnStatement(New CodeFieldReferenceExpression(New CodeThisReferenceExpression(), "integerField"))) ' Declares a property set statement to set the value to the integer field. ' The CodePropertySetValueReferenceExpression represents the value argument passed to the property set statement. property1.SetStatements.Add(New CodeAssignStatement(New CodeFieldReferenceExpression(New CodeThisReferenceExpression(), "integerField"), New CodePropertySetValueReferenceExpression())) type1.Members.Add(property1) ' A Visual Basic code generator produces the following source code for the preceeding example code: ' Public Class Type1 ' ' Private integerField As Integer ' ' Public Sub New() ' MyBase.New() ' End Sub ' ' Private Property integerProperty() As Integer ' Get ' Return Me.integerField ' End Get ' Set(ByVal Value As Integer) ' Me.integerField = value ' End Set ' End Property ' End Class
// Declares a type. CodeTypeDeclaration type1 = new CodeTypeDeclaration("Type1"); // Declares a constructor. CodeConstructor constructor1 = new CodeConstructor(); constructor1.Attributes = MemberAttributes.Public; type1.Members.Add( constructor1 ); // Declares an integer field. CodeMemberField field1 = new CodeMemberField("System.Int32" , "integerField"); type1.Members.Add( field1 ); // Declares a property. CodeMemberProperty property1 = new CodeMemberProperty(); // Declares a property get statement to return the value of the integer field. property1.GetStatements.Add( new CodeMethodReturnStatement( new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "integerField") ) ); // Declares a property set statement to set the value to the integer field. // The CodePropertySetValueReferenceExpression represents the value argument passed to the property set statement. property1.SetStatements.Add( new CodeAssignStatement( new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "integerField"), new CodePropertySetValueReferenceExpression() ) ); type1.Members.Add( property1 ); // A C# code generator produces the following source code for the preceeding example code: // public class Type1 // { // // private int integerField; // // public Type1() // { // } // // private int integerProperty // { // get // { // return this.integerField; // } // set // { // this.integerField = value; // } // } // }
// Declares a type. CodeTypeDeclaration^ type1 = gcnew CodeTypeDeclaration( "Type1" ); // Declares a constructor. CodeConstructor^ constructor1 = gcnew CodeConstructor; constructor1->Attributes = MemberAttributes::Public; type1->Members->Add( constructor1 ); // Declares an integer field. CodeMemberField^ field1 = gcnew CodeMemberField( "System.Int32","integerField" ); type1->Members->Add( field1 ); // Declares a property. CodeMemberProperty^ property1 = gcnew CodeMemberProperty; // Declares a property get statement to return the value of the integer field. property1->GetStatements->Add( gcnew CodeMethodReturnStatement( gcnew CodeFieldReferenceExpression( gcnew CodeThisReferenceExpression,"integerField" ) ) ); // Declares a property set statement to set the value to the integer field. // The CodePropertySetValueReferenceExpression represents the value argument passed to the property set statement. property1->SetStatements->Add( gcnew CodeAssignStatement( gcnew CodeFieldReferenceExpression( gcnew CodeThisReferenceExpression,"integerField" ),gcnew CodePropertySetValueReferenceExpression ) ); type1->Members->Add( property1 ); // A C# code generator produces the following source code for the preceeding example code: // public class Type1 // { // // private int integerField; // // public Type1() // { // } // // private int integerProperty // { // get // { // return this.integerField; // } // set // { // this.integerField = value; // } // } // }
// Declares a type. CodeTypeDeclaration type1 = new CodeTypeDeclaration("Type1"); // Declares a constructor. CodeConstructor constructor1 = new CodeConstructor(); constructor1.set_Attributes(MemberAttributes.Public); type1.get_Members().Add(constructor1); // Declares an integer field. CodeMemberField field1 = new CodeMemberField("System.Int32" , "integerField"); type1.get_Members().Add(field1); // Declares a property. CodeMemberProperty property1 = new CodeMemberProperty(); // Declares a property get statement to return the value // of the integer field. property1.get_GetStatements().Add(new CodeMethodReturnStatement( new CodeFieldReferenceExpression(new CodeThisReferenceExpression() , "integerField"))); // Declares a property set statement to set the value // to the integer field. // The CodePropertySetValueReferenceExpression represents the value // argument passed to the property set statement. property1.get_SetStatements().Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "integerField"), new CodePropertySetValueReferenceExpression())); type1.get_Members().Add(property1); // A VJ# code generator produces the following source code for the // preceeding example code: // public class Type1 // { // private int integerField; // // public Type1() // { // } //Type1 // // /** @property // */ // private int get_integerProperty() // { // return this.integerField; // } //get_integerProperty // // /** @property // */ // private void set_integerProperty(int value) // { // this.integerField = value; // } //set_integerProperty // } //Type1

System.CodeDom.CodeObject
System.CodeDom.CodeExpression
System.CodeDom.CodePropertySetValueReferenceExpression


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


CodePropertySetValueReferenceExpression コンストラクタ
アセンブリ: System (system.dll 内)


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


関連項目
CodePropertySetValueReferenceExpression クラスCodePropertySetValueReferenceExpression メンバ
System.CodeDom 名前空間
CodePropertySetValueReferenceExpression プロパティ
CodePropertySetValueReferenceExpression メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

CodePropertySetValueReferenceExpression メンバ
プロパティ設定メソッドの中の、プロパティ設定メソッドの呼び出しの値引数を表します。
CodePropertySetValueReferenceExpression データ型で公開されるメンバを以下の表に示します。

名前 | 説明 | |
---|---|---|
![]() | CodePropertySetValueReferenceExpression |


名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

- CodePropertySetValueReferenceExpressionのページへのリンク