The Labs \ Source Viewer \ SSCLI \ System \ UnauthorizedAccessException

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. /*============================================================
  16. **
  17. ** Class:  UnauthorizedAccessException
  18. **
  19. **
  20. ** Purpose: An exception for OS 'access denied' types of
  21. **          errors, including IO and limited security types
  22. **          of errors.
  23. **
  24. **
  25. ===========================================================*/
  26. using System;
  27. using System.Runtime.Serialization;
  28. namespace System
  29. {
  30.     // The UnauthorizedAccessException is thrown when access errors
  31.     // occur from IO or other OS methods.
  32.     [Serializable()]
  33.     [System.Runtime.InteropServices.ComVisible(true)]
  34.     public class UnauthorizedAccessException : SystemException
  35.     {
  36.         public UnauthorizedAccessException() : base(Environment.GetResourceString("Arg_UnauthorizedAccessException"))
  37.         {
  38.             SetErrorCode(__HResults.COR_E_UNAUTHORIZEDACCESS);
  39.         }
  40.        
  41.         public UnauthorizedAccessException(string message) : base(message)
  42.         {
  43.             SetErrorCode(__HResults.COR_E_UNAUTHORIZEDACCESS);
  44.         }
  45.        
  46.         public UnauthorizedAccessException(string message, Exception inner) : base(message, inner)
  47.         {
  48.             SetErrorCode(__HResults.COR_E_UNAUTHORIZEDACCESS);
  49.         }
  50.        
  51.         protected UnauthorizedAccessException(SerializationInfo info, StreamingContext context) : base(info, context)
  52.         {
  53.         }
  54.     }
  55. }

Developer Fusion