System.IO.Tests.FileLoadExceptionInteropTests.Fom_HR C# (CSharp) Méthode

Fom_HR() private méthode

private Fom_HR ( int hr ) : void
hr int
Résultat void
        public static void Fom_HR(int hr)
        {
            var fileLoadException = Marshal.GetExceptionForHR(hr, new IntPtr(-1)) as FileLoadException;
            Assert.NotNull(fileLoadException);

            // Don't validate the message.  Currently .NET Native does not produce HR-specific messages
            ExceptionUtility.ValidateExceptionProperties(fileLoadException, hResult: hr, validateMessage: false);
            Assert.Null(fileLoadException.FileName);
        }
    }
FileLoadExceptionInteropTests