The exception that is thrown when a data stream is in an invalid format. C#. [System.Serializable] public sealed class InvalidDataException : SystemException.