InvalidDataException.cs 931 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // System.InvalidDataException.cs
  3. //
  4. // Authors:
  5. // Christopher James Lahey <[email protected]>
  6. // Andreas Nahr ([email protected])
  7. //
  8. // (C) 2004 Novell, Inc. http://www.novell.com
  9. //
  10. #if NET_2_0
  11. using System.Globalization;
  12. using System.Runtime.Serialization;
  13. namespace System.IO
  14. {
  15. [Serializable]
  16. public class InvalidDataException : SystemException
  17. {
  18. const int Result = unchecked ((int)0x80131503);
  19. // Constructors
  20. public InvalidDataException ()
  21. : base (Locale.GetText ("Invalid data format."))
  22. {
  23. HResult = Result;
  24. }
  25. public InvalidDataException (string message)
  26. : base (message)
  27. {
  28. HResult = Result;
  29. }
  30. public InvalidDataException (string message, Exception innerException)
  31. : base (message, innerException)
  32. {
  33. HResult = Result;
  34. }
  35. protected InvalidDataException (SerializationInfo info, StreamingContext context)
  36. : base (info, context)
  37. {
  38. }
  39. }
  40. }
  41. #endif