IOException.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. using System;
  5. using System.Runtime.Serialization;
  6. namespace System.IO
  7. {
  8. [Serializable]
  9. [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
  10. public class IOException : SystemException
  11. {
  12. public IOException()
  13. : base(SR.Arg_IOException)
  14. {
  15. HResult = HResults.COR_E_IO;
  16. }
  17. public IOException(string message)
  18. : base(message)
  19. {
  20. HResult = HResults.COR_E_IO;
  21. }
  22. public IOException(string message, int hresult)
  23. : base(message)
  24. {
  25. HResult = hresult;
  26. }
  27. public IOException(string message, Exception innerException)
  28. : base(message, innerException)
  29. {
  30. HResult = HResults.COR_E_IO;
  31. }
  32. protected IOException(SerializationInfo info, StreamingContext context) : base(info, context)
  33. {
  34. }
  35. }
  36. }