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

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

CodeAssignStatement を使用して、オブジェクトの値を別のオブジェクトに代入するステートメントや、参照を別の参照に代入するステートメントを表すことができます。単純な代入ステートメントの通常の書式は "value1 = value2" です。value1 は代入先のオブジェクトであり、value2 は代入されるオブジェクトです。Left プロパティが、代入先のオブジェクトを示します。Right プロパティが、代入するオブジェクトを示します。

値 10 を i という名前の整数変数に代入する CodeAssignStatement を作成するコードを次に示します。
' Assigns the value 10 to the integer variable "i". Dim as1 As New CodeAssignStatement(New CodeVariableReferenceExpression("i"), New CodePrimitiveExpression(10)) ' A Visual Basic code generator produces the following source code for the preceeding example code: ' i = 10
// Assigns the value of the 10 to the integer variable "i". CodeAssignStatement as1 = new CodeAssignStatement(new CodeVariableReferenceExpression("i"), new CodePrimitiveExpression(10)); // A C# code generator produces the following source code for the preceeding example code: // i=10;

System.CodeDom.CodeObject
System.CodeDom.CodeStatement
System.CodeDom.CodeAssignStatement


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


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