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

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

CodeVariableDeclarationStatement を使用して、変数を宣言するコードを表すことができます。
Type プロパティは、宣言する変数の型を指定します。Name プロパティは、宣言する変数の名前を指定します。InitExpression プロパティは省略可能で、変数を作成した後に割り当てを行うための初期化式を指定します。
![]() |
---|

CodeVariableDeclarationStatement を使用して変数を宣言する例を次に示します。
Dim variableDeclaration As New CodeVariableDeclarationStatement( _ GetType(String), "TestString", _ New CodePrimitiveExpression("Testing")) ' The first two parameters indicate the type and name of the variable to declare. ' The optional initExpression parameter initializes the variable. ' A Visual Basic code generator produces the following source code for the preceeding example code: ' Dim TestString As String = "Testing"
CodeVariableDeclarationStatement variableDeclaration = new CodeVariableDeclarationStatement( // Type of the variable to declare. typeof(string), // Name of the variable to declare. "TestString", // Optional initExpression parameter initializes the variable. new CodePrimitiveExpression("Testing") ); // A C# code generator produces the following source code for the preceeding example code: // string TestString = "Testing";
// Type of the variable to declare. // Name of the variable to declare. // Optional initExpression parameter initializes the variable. CodeVariableDeclarationStatement^ variableDeclaration = gcnew CodeVariableDeclarationStatement( String::typeid,"TestString",gcnew CodePrimitiveExpression( "Testing" ) ); // A C# code generator produces the following source code for the preceeding example code: // string TestString = "Testing";
CodeVariableDeclarationStatement variableDeclaration = new CodeVariableDeclarationStatement( // Type of the variable to declare. String.class.ToType(), // Name of the variable to declare. "TestString", // Optional initExpression parameter initializes the variable. new CodePrimitiveExpression("Testing")); // A VJ# code generator produces the following source code for the // preceeding example code: // String testString = "Testing";

System.CodeDom.CodeObject
System.CodeDom.CodeStatement
System.CodeDom.CodeVariableDeclarationStatement


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


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


CodeVariableDeclarationStatement コンストラクタ (Type, String)
アセンブリ: System (system.dll 内)

Dim type As Type Dim name As String Dim instance As New CodeVariableDeclarationStatement(type, name)

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


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

Dim type As String Dim name As String Dim instance As New CodeVariableDeclarationStatement(type, name)

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


CodeVariableDeclarationStatement コンストラクタ (Type, String, CodeExpression)
アセンブリ: System (system.dll 内)

Dim type As Type Dim name As String Dim initExpression As CodeExpression Dim instance As New CodeVariableDeclarationStatement(type, name, initExpression)
public: CodeVariableDeclarationStatement ( Type^ type, String^ name, CodeExpression^ initExpression )
public function CodeVariableDeclarationStatement ( type : Type, name : String, initExpression : CodeExpression )

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


CodeVariableDeclarationStatement コンストラクタ (CodeTypeReference, String, CodeExpression)
アセンブリ: System (system.dll 内)

Public Sub New ( _ type As CodeTypeReference, _ name As String, _ initExpression As CodeExpression _ )
Dim type As CodeTypeReference Dim name As String Dim initExpression As CodeExpression Dim instance As New CodeVariableDeclarationStatement(type, name, initExpression)
public CodeVariableDeclarationStatement ( CodeTypeReference type, string name, CodeExpression initExpression )
public: CodeVariableDeclarationStatement ( CodeTypeReference^ type, String^ name, CodeExpression^ initExpression )
public CodeVariableDeclarationStatement ( CodeTypeReference type, String name, CodeExpression initExpression )
public function CodeVariableDeclarationStatement ( type : CodeTypeReference, name : String, initExpression : CodeExpression )

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


CodeVariableDeclarationStatement コンストラクタ (String, String, CodeExpression)
アセンブリ: System (system.dll 内)

Dim type As String Dim name As String Dim initExpression As CodeExpression Dim instance As New CodeVariableDeclarationStatement(type, name, initExpression)
public: CodeVariableDeclarationStatement ( String^ type, String^ name, CodeExpression^ initExpression )
public function CodeVariableDeclarationStatement ( type : String, name : String, initExpression : CodeExpression )

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


CodeVariableDeclarationStatement コンストラクタ (CodeTypeReference, String)
アセンブリ: System (system.dll 内)

Dim type As CodeTypeReference Dim name As String Dim instance As New CodeVariableDeclarationStatement(type, name)

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


CodeVariableDeclarationStatement コンストラクタ

名前 | 説明 |
---|---|
CodeVariableDeclarationStatement () | CodeVariableDeclarationStatement クラスの新しいインスタンスを初期化します。 |
CodeVariableDeclarationStatement (CodeTypeReference, String) | 型と名前を指定して、CodeVariableDeclarationStatement クラスの新しいインスタンスを初期化します。 |
CodeVariableDeclarationStatement (String, String) | データ型名と変数名を指定して、CodeVariableDeclarationStatement クラスの新しいインスタンスを初期化します。 |
CodeVariableDeclarationStatement (Type, String) | データ型と変数名を指定して、CodeVariableDeclarationStatement クラスの新しいインスタンスを初期化します。 |
CodeVariableDeclarationStatement (CodeTypeReference, String, CodeExpression) | データ型、変数名、および初期化式を指定して、CodeVariableDeclarationStatement クラスの新しいインスタンスを初期化します。 |
CodeVariableDeclarationStatement (String, String, CodeExpression) | データ型、変数名、および初期化式を指定して、CodeVariableDeclarationStatement クラスの新しいインスタンスを初期化します。 |
CodeVariableDeclarationStatement (Type, String, CodeExpression) | データ型、変数名、および初期化式を指定して、CodeVariableDeclarationStatement クラスの新しいインスタンスを初期化します。 |

CodeVariableDeclarationStatement プロパティ

名前 | 説明 | |
---|---|---|
![]() | EndDirectives | 終了ディレクティブを含む CodeDirectiveCollection オブジェクトを取得します。 ( CodeStatement から継承されます。) |
![]() | InitExpression | 変数の初期化式を取得または設定します。 |
![]() | LinePragma | コード ステートメントのある行を取得または設定します。 ( CodeStatement から継承されます。) |
![]() | Name | 変数の名前を取得または設定します。 |
![]() | StartDirectives | 開始ディレクティブを含む CodeDirectiveCollection オブジェクトを取得します。 ( CodeStatement から継承されます。) |
![]() | Type | 変数のデータ型を取得または設定します。 |
![]() | UserData | 現在のオブジェクトのユーザー定義可能なデータを取得または設定します。 ( CodeObject から継承されます。) |

CodeVariableDeclarationStatement メソッド

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

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

CodeVariableDeclarationStatement メンバ
CodeVariableDeclarationStatement データ型で公開されるメンバを以下の表に示します。

名前 | 説明 | |
---|---|---|
![]() | CodeVariableDeclarationStatement | オーバーロードされます。 CodeVariableDeclarationStatement クラスの新しいインスタンスを初期化します。 |

名前 | 説明 | |
---|---|---|
![]() | EndDirectives | 終了ディレクティブを含む CodeDirectiveCollection オブジェクトを取得します。(CodeStatement から継承されます。) |
![]() | InitExpression | 変数の初期化式を取得または設定します。 |
![]() | LinePragma | コード ステートメントのある行を取得または設定します。 (CodeStatement から継承されます。) |
![]() | Name | 変数の名前を取得または設定します。 |
![]() | StartDirectives | 開始ディレクティブを含む CodeDirectiveCollection オブジェクトを取得します。(CodeStatement から継承されます。) |
![]() | Type | 変数のデータ型を取得または設定します。 |
![]() | UserData | 現在のオブジェクトのユーザー定義可能なデータを取得または設定します。(CodeObject から継承されます。) |

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

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

Weblioに収録されているすべての辞書からCodeVariableDeclarationStatementを検索する場合は、下記のリンクをクリックしてください。

- CodeVariableDeclarationStatementのページへのリンク