ParserErrorCollection クラスとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ParserErrorCollection クラスの意味・解説 

ParserErrorCollection クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

解析中に検出される一連のパーサー エラー管理します。このクラス継承できません。

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

<SerializableAttribute> _
Public NotInheritable Class
 ParserErrorCollection
    Inherits CollectionBase
Dim instance As ParserErrorCollection
[SerializableAttribute] 
public sealed class ParserErrorCollection :
 CollectionBase
[SerializableAttribute] 
public ref class ParserErrorCollection sealed
 : public CollectionBase
/** @attribute SerializableAttribute() */ 
public final class ParserErrorCollection extends
 CollectionBase
SerializableAttribute 
public final class ParserErrorCollection extends
 CollectionBase
解説解説
使用例使用例

ParserErrorCollection メソッド使用する方法次のコード例示します

' Create an empty ParserErrorCollection.
Dim collection As New ParserErrorCollection()

' Add a ParserError to the collection.
collection.Add(New ParserError("ErrorName",
 "Path", 1))

' Add an array of ParserError objects to the collection.
Dim errors As ParserError() = _
    {New ParserError("Error 2", "Path",
 1), _
    New ParserError("Error 3",
 "Path", 1)}
collection.AddRange(errors)

' Ads a collection of ParserError objects to the collection.
Dim errorsCollection As New
 ParserErrorCollection()
errorsCollection.Add(New ParserError("Error",
 "Path", 1))
errorsCollection.Add(New ParserError("Error",
 "Path", 1))
collection.AddRange(errorsCollection)

' Test for the presence of a ParserError in the 
' collection, and retrieve its index if it is found.
Dim testError As New ParserError("Error",
 "Path", 1)
Dim itemIndex As Integer
 = -1
If collection.Contains(testError) Then
  itemIndex = collection.IndexOf(testError)
End If

' Copy the contents of the collection to a
' compatible array, starting at index 0 of the
' destination array. 
Dim errorsToSort(5) As ParserError
collection.CopyTo(errorsToSort, 0)

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

' Insert a ParserError at index 0 of the collection.
Dim [error] As New ParserError("Error",
 "Path", 1)
collection.Insert(0, [error])

' Remove the specified ParserError from the collection.
collection.Remove([error])

' Remove the ParserError at index 0.
collection.RemoveAt(0)
// Create an empty ParserErrorCollection.
ParserErrorCollection collection = new ParserErrorCollection();

// Add a ParserError to the collection.
collection.Add(new ParserError("ErrorName", "Path",
 1));

// Add an array of ParserError objects to the collection.
ParserError[] errors = 
    { new ParserError("Error 2", "Path", 1),
 
    new ParserError("Error 3", "Path", 1)
 };
collection.AddRange(errors);

// Add a collection of ParserError objects to the collection.
ParserErrorCollection errorsCollection = new ParserErrorCollection();
errorsCollection.Add(new ParserError("Error", "Path",
 1));
errorsCollection.Add(new ParserError("Error", "Path",
 1));
collection.AddRange(errorsCollection);

// Test for the presence of a ParserError in the 
// collection, and retrieve its index if it is found.
ParserError testError = new ParserError("Error", "Path",
 1);
int itemIndex = -1;
if (collection.Contains(testError))
  itemIndex = collection.IndexOf(testError);

// Copy the contents of the collection to a
// compatible array, starting at index 0 of the
// destination array. 
ParserError[] errorsToSort = new ParserError[5];
collection.CopyTo(errorsToSort, 0);

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

// Insert a ParserError at index 0 of the collection.
ParserError error = new ParserError("Error", "Path",
 1);
collection.Insert(0, error);

// Remove the specified ParserError from the collection.
collection.Remove(error);

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



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

辞書ショートカット

すべての辞書の索引

「ParserErrorCollection クラス」の関連用語

ParserErrorCollection クラスのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS