Microsoft.Win32.RegistryKey.Win32ErrorStatic C# (CSharp) Méthode

Win32ErrorStatic() private static méthode

private static Win32ErrorStatic ( int errorCode, string str ) : void
errorCode int
str string
Résultat void
        private static void Win32ErrorStatic(int errorCode, string str)
        {
            switch (errorCode)
            {
                case Interop.Errors.ERROR_ACCESS_DENIED:
                    throw str != null ?
                        new UnauthorizedAccessException(SR.Format(SR.UnauthorizedAccess_RegistryKeyGeneric_Key, str)) :
                        new UnauthorizedAccessException();

                default:
                    throw new IOException(Interop.Kernel32.GetMessage(errorCode), errorCode);
            }
        }