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


CompilerErrorCollection クラスは、CompilerError オブジェクトのセットを格納するために使用できる単純なコレクション オブジェクトを提供します。
![]() |
---|
このクラスには、すべてのメンバに適用されるクラス レベルの継承確認要求が格納されます。派生クラスに完全信頼のアクセス許可がない場合、SecurityException がスローされます。継承確認要求の詳細については、「継承確認要求」を参照してください。 |

' Creates an empty CompilerErrorCollection. Dim collection As New CompilerErrorCollection() ' Adds a CompilerError to the collection. collection.Add(New CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text")) ' Adds an array of CompilerError objects to the collection. Dim errors As CompilerError() = {New CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text"), New CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text")} collection.AddRange(errors) ' Adds a collection of CompilerError objects to the collection. Dim errorsCollection As New CompilerErrorCollection() errorsCollection.Add(New CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text")) errorsCollection.Add(New CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text")) collection.AddRange(errorsCollection) ' Tests for the presence of a CompilerError in the ' collection, and retrieves its index if it is found. Dim testError As New CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text") Dim itemIndex As Integer = -1 If collection.Contains(testError) Then itemIndex = collection.IndexOf(testError) End If ' Copies the contents of the collection, beginning at index 0, ' to the specified CompilerError array. ' 'errors' is a CompilerError array. collection.CopyTo(errors, 0) ' Retrieves the count of the items in the collection. Dim collectionCount As Integer = collection.Count ' Inserts a CompilerError at index 0 of the collection. collection.Insert(0, New CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text")) ' Removes the specified CompilerError from the collection. Dim [error] As New CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text") collection.Remove([error]) ' Removes the CompilerError at index 0. collection.RemoveAt(0)
// Creates an empty CompilerErrorCollection. CompilerErrorCollection collection = new CompilerErrorCollection(); // Adds a CompilerError to the collection. collection.Add( new CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text") ); // Adds an array of CompilerError objects to the collection. CompilerError[] errors = { new CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text"), new CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text") }; collection.AddRange( errors ); // Adds a collection of CompilerError objects to the collection. CompilerErrorCollection errorsCollection = new CompilerErrorCollection(); errorsCollection.Add( new CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text") ); errorsCollection.Add( new CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text") ); collection.AddRange( errorsCollection ); // Tests for the presence of a CompilerError in the // collection, and retrieves its index if it is found. CompilerError testError = new CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text"); int itemIndex = -1; if( collection.Contains( testError ) ) itemIndex = collection.IndexOf( testError ); // Copies the contents of the collection, beginning at index 0, // to the specified CompilerError array. // 'errors' is a CompilerError array. collection.CopyTo( errors, 0 ); // Retrieves the count of the items in the collection. int collectionCount = collection.Count; // Inserts a CompilerError at index 0 of the collection. collection.Insert( 0, new CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text") ); // Removes the specified CompilerError from the collection. CompilerError error = new CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text"); collection.Remove( error ); // Removes the CompilerError at index 0. collection.RemoveAt(0);
// Creates an empty CompilerErrorCollection. CompilerErrorCollection^ collection = gcnew CompilerErrorCollection; // Adds a CompilerError to the collection. collection->Add( gcnew CompilerError( "Testfile::cs",5,10,"CS0001","Example error text" ) ); // Adds an array of CompilerError objects to the collection. array<CompilerError^>^errors = {gcnew CompilerError( "Testfile.cs",5,10,"CS0001","Example error text" ),gcnew CompilerError( "Testfile::cs",5,10,"CS0001","Example error text" )}; collection->AddRange( errors ); // Adds a collection of CompilerError objects to the collection. CompilerErrorCollection^ errorsCollection = gcnew CompilerErrorCollection; errorsCollection->Add( gcnew CompilerError( "Testfile.cs",5,10,"CS0001","Example error text" ) ); errorsCollection->Add( gcnew CompilerError( "Testfile.cs",5,10,"CS0001","Example error text" ) ); collection->AddRange( errorsCollection ); // Tests for the presence of a CompilerError in the // collection, and retrieves its index if it is found. CompilerError^ testError = gcnew CompilerError( "Testfile.cs",5,10,"CS0001","Example error text" ); int itemIndex = -1; if ( collection->Contains( testError ) ) itemIndex = collection->IndexOf( testError ); // Copies the contents of the collection, beginning at index 0, // to the specified CompilerError array. // 'errors' is a CompilerError array. collection->CopyTo( errors, 0 ); // Retrieves the count of the items in the collection. int collectionCount = collection->Count; // Inserts a CompilerError at index 0 of the collection. collection->Insert( 0, gcnew CompilerError( "Testfile.cs",5,10,"CS0001","Example error text" ) ); // Removes the specified CompilerError from the collection. CompilerError^ error = gcnew CompilerError( "Testfile.cs",5,10,"CS0001","Example error text" ); collection->Remove( error ); // Removes the CompilerError at index 0. collection->RemoveAt( 0 );
// Creates an empty CompilerErrorCollection. CompilerErrorCollection collection = new CompilerErrorCollection(); // Adds a CompilerError to the collection. collection.Add(new CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text")); // Adds an array of CompilerError objects to the collection. CompilerError errors[] = { new CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text"), new CompilerError("Testfile.jsl", 5, 10, "CS0001", "Example error text") }; collection.AddRange(errors); // Adds a collection of CompilerError objects to the collection. CompilerErrorCollection errorsCollection = new CompilerErrorCollection(); errorsCollection.Add(new CompilerError("Testfile.jsl", 5, 10, "CS0001", "Example error text")); errorsCollection.Add(new CompilerError("Testfile.jsl", 5, 10, "JSL0001", "Example error text")); collection.AddRange(errorsCollection); // Tests for the presence of a CompilerError in the // collection, and retrieves its index if it is found. CompilerError testError = new CompilerError("Testfile.JSL", 5, 10, "JSL0001", "Example error text"); int itemIndex = -1; if (collection.Contains(testError)) { itemIndex = collection.IndexOf(testError); } // Copies the contents of the collection, beginning at index 0, // to the specified CompilerError array. // 'errors' is a CompilerError array. collection.CopyTo(errors, 0); // Retrieves the count of the items in the collection. int collectionCount = collection.get_Count(); // Inserts a CompilerError at index 0 of the collection. collection.Insert(0, new CompilerError("Testfile.cs", 5, 10, "JSL0001", "Example error text")); // Removes the specified CompilerError from the collection. CompilerError error = new CompilerError("Testfile.cs", 5, 10, "JSL0001", "Example error text"); collection.Remove(error); // Removes the CompilerError at index 0. collection.RemoveAt(0);


System.Collections.CollectionBase
System.CodeDom.Compiler.CompilerErrorCollection


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


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


' Creates an empty CompilerErrorCollection. Dim collection As New CompilerErrorCollection()
// Creates an empty CompilerErrorCollection. CompilerErrorCollection collection = new CompilerErrorCollection();
// Creates an empty CompilerErrorCollection. CompilerErrorCollection^ collection = gcnew CompilerErrorCollection;
// Creates an empty CompilerErrorCollection. CompilerErrorCollection collection = new CompilerErrorCollection();

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


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


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


CompilerErrorCollection コンストラクタ

名前 | 説明 |
---|---|
CompilerErrorCollection () | CompilerErrorCollection クラスの新しいインスタンスを初期化します。 |
CompilerErrorCollection (CompilerError[]) | CompilerError オブジェクトの指定した配列を格納する CompilerErrorCollection の新しいインスタンスを初期化します。 |
CompilerErrorCollection (CompilerErrorCollection) | 指定した CompilerErrorCollection の内容を格納する CompilerErrorCollection の新しいインスタンスを初期化します。 |

CompilerErrorCollection プロパティ

名前 | 説明 | |
---|---|---|
![]() | Capacity | CollectionBase に格納できる要素の数を取得または設定します。 ( CollectionBase から継承されます。) |
![]() | Count | CollectionBase インスタンスに格納されている要素の数を取得します。このプロパティはオーバーライドできません。 ( CollectionBase から継承されます。) |
![]() | HasErrors | コレクションにエラーが格納されているかどうかを示す値を取得します。 |
![]() | HasWarnings | コレクションに警告が格納されているかどうかを示す値を取得します。 |
![]() | Item | 指定したインデックス位置にある CompilerError を取得または設定します。 |

名前 | 説明 | |
---|---|---|
![]() | InnerList | CollectionBase インスタンス内の要素のリストを格納する ArrayList を取得します。 ( CollectionBase から継承されます。) |
![]() | List | CollectionBase インスタンス内の要素のリストを格納する IList を取得します。 ( CollectionBase から継承されます。) |

CompilerErrorCollection メソッド


名前 | 説明 | |
---|---|---|
![]() | 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 から継承されます。) |

CompilerErrorCollection メンバ
CompilerError オブジェクトのコレクションを表します。
CompilerErrorCollection データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | Capacity | CollectionBase に格納できる要素の数を取得または設定します。(CollectionBase から継承されます。) |
![]() | Count | CollectionBase インスタンスに格納されている要素の数を取得します。このプロパティはオーバーライドできません。(CollectionBase から継承されます。) |
![]() | HasErrors | コレクションにエラーが格納されているかどうかを示す値を取得します。 |
![]() | HasWarnings | コレクションに警告が格納されているかどうかを示す値を取得します。 |
![]() | Item | 指定したインデックス位置にある CompilerError を取得または設定します。 |

名前 | 説明 | |
---|---|---|
![]() | InnerList | CollectionBase インスタンス内の要素のリストを格納する ArrayList を取得します。(CollectionBase から継承されます。) |
![]() | List | CollectionBase インスタンス内の要素のリストを格納する IList を取得します。(CollectionBase から継承されます。) |


名前 | 説明 | |
---|---|---|
![]() | 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 から継承されます。) |

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

- CompilerErrorCollectionのページへのリンク