ParserError Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a parser error or warning. This class cannot be inherited.
public ref class ParserError sealed
[System.Serializable]
public sealed class ParserError
[<System.Serializable>]
type ParserError = class
Public NotInheritable Class ParserError
- Inheritance
-
ParserError
- Attributes
The following code example demonstrates how to add a new parser error to a ParserErrorCollection object.
// Add a ParserError to the collection.
collection.Add(new ParserError("ErrorName", "Path", 1));
' Add a ParserError to the collection.
collection.Add(New ParserError("ErrorName", "Path", 1))
A ParserError object represents an error that is created when an HttpParseException exception is thrown. A parser error object can contain error message text, a virtual path to the file where the error occurred, and the subsequent line number of the error in that file. If more than one parser error occurs or you want to store multiple parser errors in a centralized location, use the ParserErrorCollection object.
A parser error is of the type HttpException. For more information on exceptions and how to handle them, see Handling and throwing exceptions in .NET.
Parser |
Initializes a new instance of the ParserError class. |
Parser |
Initializes a new instance of the ParserError class by using the specified error text, virtual path, and source line number. |
Error |
Gets or sets a string that represents the error for the ParserError object. |
Line |
Gets or sets the line number of the source at which the error occurs. |
Virtual |
Gets or set the virtual path of the file that was being parsed when the error occurred. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string that represents the current object. (Inherited from Object) |
製品 | バージョン |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET に関するフィードバック
.NET はオープンソース プロジェクトです。 フィードバックを提供するにはリンクを選択します。