CodeStatementCollectionとは? わかりやすく解説

CodeStatementCollection クラス

CodeStatement オブジェクトコレクション表します

名前空間: System.CodeDom
アセンブリ: System (system.dll 内)
構文構文

<SerializableAttribute> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
<ComVisibleAttribute(True)> _
Public Class CodeStatementCollection
    Inherits CollectionBase
Dim instance As CodeStatementCollection
[SerializableAttribute] 
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] 
[ComVisibleAttribute(true)] 
public class CodeStatementCollection : CollectionBase
[SerializableAttribute] 
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] 
[ComVisibleAttribute(true)] 
public ref class CodeStatementCollection :
 public CollectionBase
/** @attribute SerializableAttribute() */ 
/** @attribute ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) */ 
/** @attribute ComVisibleAttribute(true) */ 
public class CodeStatementCollection extends
 CollectionBase
SerializableAttribute 
ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) 
ComVisibleAttribute(true) 
public class CodeStatementCollection extends
 CollectionBase
解説解説
使用例使用例
' Creates an empty CodeStatementCollection.
Dim collection As New CodeStatementCollection

' Adds a CodeStatement to the collection.
collection.Add(New CodeCommentStatement("Test
 comment statement"))

' Adds an array of CodeStatement objects to the collection.
Dim statements As CodeStatement() = {New CodeCommentStatement("Test
 comment statement"), New CodeCommentStatement("Test
 comment statement")}
collection.AddRange(statements)

' Adds a collection of CodeStatement objects to the collection.
Dim testStatement As New
 CodeStatement
Dim statementsCollection As New
 CodeStatementCollection
statementsCollection.Add(New CodeCommentStatement("Test
 comment statement"))
statementsCollection.Add(New CodeCommentStatement("Test
 comment statement"))
statementsCollection.Add(testStatement)
collection.AddRange(statementsCollection)

' Tests for the presence of a CodeStatement in the 
' collection, and retrieves its index if it is found.
Dim itemIndex As Integer
 = -1
If collection.Contains(testStatement) Then
    itemIndex = collection.IndexOf(testStatement)
End If

' Copies the contents of the collection beginning at index 0 to the
 specified CodeStatement array.
' 'statements' is a CodeStatement array.
Dim statementArray(collection.Count) As CodeStatement
collection.CopyTo(statementArray, 0)

' Retrieves the count of the items in the collection.
Dim collectionCount As Integer
 = collection.Count

' Inserts a CodeStatement at index 0 of the collection.
collection.Insert(0, New CodeCommentStatement("Test
 comment statement"))

' Removes the specified CodeStatement from the collection.
collection.Remove(testStatement)

' Removes the CodeStatement at index 0.
collection.RemoveAt(0)
// Creates an empty CodeStatementCollection.
CodeStatementCollection collection = new CodeStatementCollection();

// Adds a CodeStatement to the collection.
collection.Add( new CodeCommentStatement("Test comment statement")
 );

// Adds an array of CodeStatement objects to the collection.
CodeStatement[] statements = { 
                new CodeCommentStatement("Test comment statement"),
 
                new CodeCommentStatement("Test comment statement")};
collection.AddRange( statements );

// Adds a collection of CodeStatement objects to the collection.
CodeStatement testStatement = new CodeCommentStatement("Test
 comment statement");
CodeStatementCollection statementsCollection = new CodeStatementCollection();
statementsCollection.Add( new CodeCommentStatement("Test
 comment statement") );
statementsCollection.Add( new CodeCommentStatement("Test
 comment statement") );
statementsCollection.Add( testStatement );

collection.AddRange( statementsCollection );

// Tests for the presence of a CodeStatement in the 
// collection, and retrieves its index if it is found.
int itemIndex = -1;
if( collection.Contains( testStatement ) )
    itemIndex = collection.IndexOf( testStatement );


// Copies the contents of the collection beginning at index 0 to the
 specified CodeStatement array.
// 'statements' is a CodeStatement array.
CodeStatement[] statementArray = new CodeStatement[collection.Count];
collection.CopyTo( statementArray, 0 );

// Retrieves the count of the items in the collection.
int collectionCount = collection.Count;

// Inserts a CodeStatement at index 0 of the collection.
collection.Insert( 0, new CodeCommentStatement("Test comment
 statement") );

// Removes the specified CodeStatement from the collection.
collection.Remove( testStatement );

// Removes the CodeStatement at index 0.
collection.RemoveAt(0);
// Creates an empty CodeStatementCollection.
CodeStatementCollection^ collection = gcnew CodeStatementCollection;

// Adds a CodeStatement to the collection.
collection->Add( gcnew CodeCommentStatement( "Test comment statement"
 ) );

// Adds an array of CodeStatement objects to the collection.
array<CodeStatement^>^statements = {gcnew CodeCommentStatement( "Test
 comment statement" ),gcnew CodeCommentStatement( "Test comment statement"
 )};
collection->AddRange( statements );

// Adds a collection of CodeStatement objects to the collection.
CodeStatement^ testStatement = gcnew CodeCommentStatement( "Test comment statement"
 );
CodeStatementCollection^ statementsCollection = gcnew CodeStatementCollection;
statementsCollection->Add( gcnew CodeCommentStatement( "Test comment statement"
 ) );
statementsCollection->Add( gcnew CodeCommentStatement( "Test comment statement"
 ) );
statementsCollection->Add( testStatement );
collection->AddRange( statementsCollection );

// Tests for the presence of a CodeStatement in the 
// collection, and retrieves its index if it is found.
int itemIndex = -1;
if ( collection->Contains( testStatement ) )
   itemIndex = collection->IndexOf( testStatement );

// Copies the contents of the collection beginning at index 0 to the
 specified CodeStatement array.
// 'statements' is a CodeStatement array.
collection->CopyTo( statements, 0 );

// Retrieves the count of the items in the collection.
int collectionCount = collection->Count;

// Inserts a CodeStatement at index 0 of the collection.
collection->Insert( 0, gcnew CodeCommentStatement( "Test comment statement"
 ) );

// Removes the specified CodeStatement from the collection.
collection->Remove( testStatement );

// Removes the CodeStatement at index 0.
collection->RemoveAt( 0 );
// Creates an empty CodeStatementCollection.
CodeStatementCollection collection = new CodeStatementCollection();

// Adds a CodeStatement to the collection.
collection.Add( new CodeCommentStatement("Test comment statement")
 );

// Adds an array of CodeStatement objects to the collection.
CodeStatement[] statements = 
    { 
        new CodeCommentStatement("Test comment statement"),
 
        new CodeCommentStatement("Test comment statement")};
collection.AddRange( statements );

// Adds a collection of CodeStatement objects to the collection.
CodeStatement testStatement = new CodeCommentStatement("Test
 comment statement");
CodeStatementCollection statementsCollection = new CodeStatementCollection();
statementsCollection.Add( new CodeCommentStatement("Test
 comment statement") );
statementsCollection.Add( new CodeCommentStatement("Test
 comment statement") );
statementsCollection.Add( testStatement );

collection.AddRange( statementsCollection );

// Tests for the presence of a CodeStatement in the 
// collection, and retrieves its index if it is found.
int itemIndex = -1;
if( collection.Contains( testStatement ) )
    itemIndex = collection.IndexOf( testStatement );

// Copies the contents of the collection beginning at index 0 to the
 specified CodeStatement array.
// 'statements' is a CodeStatement array.
CodeStatement[] statementArray = new CodeStatement[collection.get_Count()];
collection.CopyTo( statementArray, 0 );

// Retrieves the count of the items in the collection.
int collectionCount = collection.get_Count();

// Inserts a CodeStatement at index 0 of the collection.
collection.Insert( 0, new CodeCommentStatement("Test comment
 statement") );

// Removes the specified CodeStatement from the collection.
collection.Remove( testStatement );

// Removes the CodeStatement at index 0.
collection.RemoveAt(0);
継承階層継承階層
System.Object
   System.Collections.CollectionBase
    System.CodeDom.CodeStatementCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeStatementCollection メンバ
System.CodeDom 名前空間
CodeStatement クラス

CodeStatementCollection コンストラクタ ()

CodeStatementCollection クラス新しインスタンス初期化します。

名前空間: System.CodeDom
アセンブリ: System (system.dll 内)
構文構文

Dim instance As New CodeStatementCollection
public CodeStatementCollection ()
public:
CodeStatementCollection ()
public CodeStatementCollection ()
public function CodeStatementCollection ()
使用例使用例
' Creates an empty CodeStatementCollection.
Dim collection As New CodeStatementCollection
// Creates an empty CodeStatementCollection.
CodeStatementCollection collection = new CodeStatementCollection();
// Creates an empty CodeStatementCollection.
CodeStatementCollection^ collection = gcnew CodeStatementCollection;
// Creates an empty CodeStatementCollection.
CodeStatementCollection collection = new CodeStatementCollection();
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeStatementCollection クラス
CodeStatementCollection メンバ
System.CodeDom 名前空間

CodeStatementCollection コンストラクタ (CodeStatementCollection)

指定したソース コレクション要素格納する CodeStatementCollection クラス新しインスタンス初期化します。

名前空間: System.CodeDom
アセンブリ: System (system.dll 内)
構文構文

Public Sub New ( _
    value As CodeStatementCollection _
)
Dim value As CodeStatementCollection

Dim instance As New CodeStatementCollection(value)
public CodeStatementCollection (
    CodeStatementCollection value
)
public:
CodeStatementCollection (
    CodeStatementCollection^ value
)
public CodeStatementCollection (
    CodeStatementCollection value
)
public function CodeStatementCollection (
    value : CodeStatementCollection
)

パラメータ

value

コレクション初期化するために使用する CodeStatementCollection。

例外例外
例外種類条件

ArgumentNullException

valuenull 参照 (Visual Basic では Nothing) です。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeStatementCollection クラス
CodeStatementCollection メンバ
System.CodeDom 名前空間

CodeStatementCollection コンストラクタ (CodeStatement[])

CodeStatement オブジェクト指定した配列格納する CodeStatementCollection クラス新しインスタンス初期化します。

名前空間: System.CodeDom
アセンブリ: System (system.dll 内)
構文構文

Public Sub New ( _
    value As CodeStatement() _
)
Dim value As CodeStatement()

Dim instance As New CodeStatementCollection(value)
public CodeStatementCollection (
    CodeStatement[] value
)
public:
CodeStatementCollection (
    array<CodeStatement^>^ value
)
public CodeStatementCollection (
    CodeStatement[] value
)
public function CodeStatementCollection (
    value : CodeStatement[]
)

パラメータ

value

コレクション初期化するために使用する CodeStatement オブジェクト配列

例外例外
例外種類条件

ArgumentNullException

valuenull 参照 (Visual Basic では Nothing) です。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeStatementCollection クラス
CodeStatementCollection メンバ
System.CodeDom 名前空間

CodeStatementCollection コンストラクタ

CodeStatementCollection クラス新しインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
CodeStatementCollection () CodeStatementCollection クラス新しインスタンス初期化します。
CodeStatementCollection (CodeStatement[]) CodeStatement オブジェクト指定した配列格納する CodeStatementCollection クラス新しインスタンス初期化します。
CodeStatementCollection (CodeStatementCollection) 指定したソース コレクション要素格納する CodeStatementCollection クラス新しインスタンス初期化します。
参照参照

関連項目

CodeStatementCollection クラス
CodeStatementCollection メンバ
System.CodeDom 名前空間

CodeStatementCollection プロパティ


パブリック プロパティパブリック プロパティ

( プロテクト プロパティ参照)
  名前 説明
パブリック プロパティ Capacity  CollectionBase に格納できる要素の数を取得または設定します。 ( CollectionBase から継承されます。)
パブリック プロパティ Count  CollectionBase インスタンス格納されている要素の数を取得します。このプロパティオーバーライドできません。 ( CollectionBase から継承されます。)
パブリック プロパティ Item コレクション内の指定したインデックスでの CodeStatement を取得または設定します
プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ InnerList  CollectionBase インスタンス内の要素リスト格納する ArrayList を取得します。 ( CollectionBase から継承されます。)
プロテクト プロパティ List  CollectionBase インスタンス内の要素リスト格納する IList を取得します。 ( CollectionBase から継承されます。)
参照参照

関連項目

CodeStatementCollection クラス
System.CodeDom 名前空間
CodeStatement クラス

CodeStatementCollection メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Add オーバーロードされます指定した CodeStatement をコレクション追加します
パブリック メソッド AddRange オーバーロードされますCodeStatement オブジェクトセットコレクション追加します
パブリック メソッド Clear  CollectionBase インスタンスかすべてのオブジェクト削除します。このメソッドオーバーライドできません。 ( CollectionBase から継承されます。)
パブリック メソッド Contains 指定した CodeStatementコレクション格納されているかどうかを示す値を取得します
パブリック メソッド CopyTo 指定したインデックスコピー開始位置として、1 次元Array インスタンスコレクション オブジェクトコピーします
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 ( Object から継承されます。)
パブリック メソッド GetEnumerator  CollectionBase インスタンス反復処理する列挙子を返します。 ( CollectionBase から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 ( Object から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド IndexOf 指定した CodeStatementコレクション内に存在する場合は、コレクション内でのそのインデックス取得します
パブリック メソッド Insert コレクション内の指定したインデックス位置に、指定した CodeStatement挿入します
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド Remove 指定した CodeStatementコレクションから削除します
パブリック メソッド RemoveAt  CollectionBase インスタンス指定したインデックスにある要素削除します。このメソッドオーバーライドできません。 ( CollectionBase から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
  名前 説明
プロテクト メソッド Finalize  Objectガベージ コレクションにより収集される前に、その Objectリソース解放しその他のクリーンアップ操作実行できるようにします。 ( Object から継承されます。)
プロテクト メソッド MemberwiseClone  現在の Object簡易コピー作成します。 ( Object から継承されます。)
プロテクト メソッド OnClear  CollectionBase インスタンス内容消去するときに、追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnClearComplete  CollectionBase インスタンス内容消去した後に、追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnInsert  CollectionBase インスタンス新し要素挿入する前に追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnInsertComplete  CollectionBase インスタンス新し要素挿入した後に、追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnRemove  CollectionBase インスタンスか要素削除するときに、追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnRemoveComplete  CollectionBase インスタンスか要素削除した後に、追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnSet  CollectionBase インスタンスに値を設定する前に追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnSetComplete  CollectionBase インスタンスに値を設定した後に、追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnValidate  値を検証するときに、追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
参照参照

関連項目

CodeStatementCollection クラス
System.CodeDom 名前空間
CodeStatement クラス

CodeStatementCollection メンバ

CodeStatement オブジェクトコレクション表します

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


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド CodeStatementCollection オーバーロードされます。 CodeStatementCollection クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
( プロテクト プロパティ参照)
  名前 説明
パブリック プロパティ Capacity  CollectionBase格納できる要素の数を取得または設定します。(CollectionBase から継承されます。)
パブリック プロパティ Count  CollectionBase インスタンス格納されている要素の数を取得します。このプロパティオーバーライドできません。(CollectionBase から継承されます。)
パブリック プロパティ Item コレクション内の指定したインデックスでの CodeStatement取得または設定します
プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ InnerList  CollectionBase インスタンス内の要素リスト格納する ArrayList を取得します。(CollectionBase から継承されます。)
プロテクト プロパティ List  CollectionBase インスタンス内の要素リスト格納する IList を取得します。(CollectionBase から継承されます。)
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Add オーバーロードされます指定した CodeStatementコレクション追加します
パブリック メソッド AddRange オーバーロードされますCodeStatement オブジェクトセットコレクション追加します
パブリック メソッド Clear  CollectionBase インスタンスかすべてのオブジェクト削除します。このメソッドオーバーライドできません。 (CollectionBase から継承されます。)
パブリック メソッド Contains 指定した CodeStatementコレクション格納されているかどうかを示す値を取得します
パブリック メソッド CopyTo 指定したインデックスコピー開始位置として、1 次元Array インスタンスコレクション オブジェクトコピーします
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。)
パブリック メソッド GetEnumerator  CollectionBase インスタンス反復処理する列挙子を返します。 (CollectionBase から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド IndexOf 指定した CodeStatementコレクション内に存在する場合は、コレクション内でのそのインデックス取得します
パブリック メソッド Insert コレクション内の指定したインデックス位置に、指定した CodeStatement挿入します
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド Remove 指定した CodeStatementコレクションから削除します
パブリック メソッド RemoveAt  CollectionBase インスタンス指定したインデックスにある要素削除します。このメソッドオーバーライドできません。 (CollectionBase から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
  名前 説明
プロテクト メソッド Finalize  Objectガベージ コレクションにより収集される前に、その Objectリソース解放しその他のクリーンアップ操作実行できるようにします。 (Object から継承されます。)
プロテクト メソッド MemberwiseClone  現在の Object簡易コピー作成します。 (Object から継承されます。)
プロテクト メソッド OnClear  CollectionBase インスタンス内容消去するときに、追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnClearComplete  CollectionBase インスタンス内容消去した後に、追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnInsert  CollectionBase インスタンス新し要素挿入する前に追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnInsertComplete  CollectionBase インスタンス新し要素挿入した後に、追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnRemove  CollectionBase インスタンスか要素削除するときに、追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnRemoveComplete  CollectionBase インスタンスか要素削除した後に、追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnSet  CollectionBase インスタンスに値を設定する前に追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnSetComplete  CollectionBase インスタンスに値を設定した後に、追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnValidate  値を検証するときに、追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
参照参照

関連項目

CodeStatementCollection クラス
System.CodeDom 名前空間
CodeStatement クラス



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「CodeStatementCollection」の関連用語

CodeStatementCollectionのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



CodeStatementCollectionのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS