XmlSchemaValidationException Constructors

Definition

Initializes a new instance of the XmlSchemaValidationException class.

Overloads

XmlSchemaValidationException()

Initializes a new instance of the XmlSchemaValidationException class.

XmlSchemaValidationException(String)

Initializes a new instance of the XmlSchemaValidationException class with the exception message specified.

XmlSchemaValidationException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the XmlSchemaValidationException class with the SerializationInfo and StreamingContext objects specified.

XmlSchemaValidationException(String, Exception)

Initializes a new instance of the XmlSchemaValidationException class with the exception message and original Exception object that caused this exception specified.

XmlSchemaValidationException(String, Exception, Int32, Int32)

Initializes a new instance of the XmlSchemaValidationException class with the exception message specified, and the original Exception object, line number, and line position of the XML that cause this exception specified.

XmlSchemaValidationException()

Source:
XmlSchemaValidationException.cs
Source:
XmlSchemaValidationException.cs
Source:
XmlSchemaValidationException.cs

Initializes a new instance of the XmlSchemaValidationException class.

C#
public XmlSchemaValidationException();

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.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 Standard 2.0, 2.1

XmlSchemaValidationException(String)

Source:
XmlSchemaValidationException.cs
Source:
XmlSchemaValidationException.cs
Source:
XmlSchemaValidationException.cs

Initializes a new instance of the XmlSchemaValidationException class with the exception message specified.

C#
public XmlSchemaValidationException(string? message);
C#
public XmlSchemaValidationException(string message);

Parameters

message
String

A string description of the error condition.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.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 Standard 2.0, 2.1

XmlSchemaValidationException(SerializationInfo, StreamingContext)

Source:
XmlSchemaValidationException.cs
Source:
XmlSchemaValidationException.cs
Source:
XmlSchemaValidationException.cs

Caution

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

Initializes a new instance of the XmlSchemaValidationException class with the SerializationInfo and StreamingContext objects specified.

C#
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected XmlSchemaValidationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
C#
protected XmlSchemaValidationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);

Parameters

Attributes

Remarks

This constructor is called by derived class constructors to initialize state in this type.

Applies to

.NET 10 and other versions
Product Versions (Obsolete)
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7 (8, 9, 10)
.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 Standard 2.0, 2.1

XmlSchemaValidationException(String, Exception)

Source:
XmlSchemaValidationException.cs
Source:
XmlSchemaValidationException.cs
Source:
XmlSchemaValidationException.cs

Initializes a new instance of the XmlSchemaValidationException class with the exception message and original Exception object that caused this exception specified.

C#
public XmlSchemaValidationException(string? message, Exception? innerException);
C#
public XmlSchemaValidationException(string message, Exception innerException);

Parameters

message
String

A string description of the error condition.

innerException
Exception

The original Exception object that caused this exception.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.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 Standard 2.0, 2.1

XmlSchemaValidationException(String, Exception, Int32, Int32)

Source:
XmlSchemaValidationException.cs
Source:
XmlSchemaValidationException.cs
Source:
XmlSchemaValidationException.cs

Initializes a new instance of the XmlSchemaValidationException class with the exception message specified, and the original Exception object, line number, and line position of the XML that cause this exception specified.

C#
public XmlSchemaValidationException(string? message, Exception? innerException, int lineNumber, int linePosition);
C#
public XmlSchemaValidationException(string message, Exception innerException, int lineNumber, int linePosition);

Parameters

message
String

A string description of the error condition.

innerException
Exception

The original Exception object that caused this exception.

lineNumber
Int32

The line number of the XML that caused this exception.

linePosition
Int32

The line position of the XML that caused this exception.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.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 Standard 2.0, 2.1