This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)
Determines whether the exception thrown is the expected exception. If the method returns, the exception was the expected exception. If the method throws an exception, the exception was not the expected exception. The message from the thrown exception is included in the test result. The Assert class can be used for convenience to throw an exception. If Assert.Inconclusive is used and the assertion statement is executed, the test outcome is set to Inconclusive.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.