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

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

CodeVariableReferenceExpression を使用して、ローカル変数への参照を表すことができます。
VariableName プロパティは、参照するローカル変数の名前を指定します。
CodeFieldReferenceExpression を使用して、フィールドを参照します。CodePropertyReferenceExpression を使用して、プロパティを参照します。CodeEventReferenceExpression を使用して、イベントを参照します。

CodeVariableReferenceExpression を使用して、ローカル変数を参照する方法については、次のコード例を参照してください。
Dim variableRef1 As New CodeVariableReferenceExpression("TestVariable") ' A Visual Basic code generator produces the following source code for the preceeding example code: ' TestVariable
CodeVariableReferenceExpression variableRef1 = new CodeVariableReferenceExpression("TestVariable"); // A C# code generator produces the following source code for the preceeding example code: // TestVariable
CodeVariableReferenceExpression^ variableRef1 = gcnew CodeVariableReferenceExpression( "TestVariable" ); // A C# code generator produces the following source code for the preceeding example code: // TestVariable
CodeVariableReferenceExpression variableRef1 = new CodeVariableReferenceExpression("TestVariable"); // A VJ# code generator produces the following source code for // the preceeding example code: // TestVariable

System.CodeDom.CodeObject
System.CodeDom.CodeExpression
System.CodeDom.CodeVariableReferenceExpression


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


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