EndOfStreamException Class

The exception that is thrown when reading is attempted past the end of a stream.

Syntax

Declaration

[Serializable]
[ComVisible(true)]
public class EndOfStreamException : IOException, ISerializable, _Exception

Inheritance Hierarchy

Constructors summary

Initializes a new instance of the EndOfStreamException class with its message string set to a system-supplied message and its HRESULT set to COR_E_ENDOFSTREAM.

Initializes a new instance of the EndOfStreamException class with its message string set to message and its HRESULT set to COR_E_ENDOFSTREAM.

Initializes a new instance of the EndOfStreamException class with a specified error message and a reference to the inner exception that is the cause of this exception.

Constructors

  • EndOfStreamException()

    Initializes a new instance of the EndOfStreamException class with its message string set to a system-supplied message and its HRESULT set to COR_E_ENDOFSTREAM.

    public EndOfStreamException()
  • EndOfStreamException(String)

    Initializes a new instance of the EndOfStreamException class with its message string set to message and its HRESULT set to COR_E_ENDOFSTREAM.

    public EndOfStreamException(string message)

    Parameters

    • message

      A string that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

  • EndOfStreamException(String, Exception)

    Initializes a new instance of the EndOfStreamException class with a specified error message and a reference to the inner exception that is the cause of this exception.

    public EndOfStreamException(string message, Exception innerException)

    Parameters

    • message

      A string that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

    • 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

See Also