InvalidDataException Class

The exception that is thrown when a data stream is in an invalid format.

Syntax

Declaration

public sealed class InvalidDataException : Exception, ISerializable, _Exception

Inheritance Hierarchy

Constructors summary

Initializes a new instance of the InvalidDataException class.

Initializes a new instance of the InvalidDataException class with a specified error message.

Initializes a new instance of the InvalidDataException class with a reference to the inner exception that is the cause of this exception.

Constructors

  • InvalidDataException()

    Initializes a new instance of the InvalidDataException class.

    public InvalidDataException()
  • InvalidDataException(String)

    Initializes a new instance of the InvalidDataException class with a specified error message.

    public InvalidDataException(string message)

    Parameters

    • message

      The error message that explains the reason for the exception.

  • InvalidDataException(String, Exception)

    Initializes a new instance of the InvalidDataException class with a reference to the inner exception that is the cause of this exception.

    public InvalidDataException(string message, Exception innerException)

    Parameters

    • message

      The error message that explains the reason for the exception.

    • innerException

      The exception that is the cause of the current exception. If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

Details

Namespace

System.IO

Assembly

System.IO.dll