RuntimeCompatibilityAttribute Constructor ()
.NET Framework (current version)
Initializes a new instance of the RuntimeCompatibilityAttribute class.
Assembly: mscorlib (in mscorlib.dll)
The following code example applies the RuntimeCompatibilityAttribute attribute to an assembly to disable exception wrapping.
using namespace System; using namespace System::Runtime::CompilerServices; [assembly:RuntimeCompatibilityAttribute(WrapNonExceptionThrows = false)]; void run() { Console::WriteLine("The RuntimeCompatibilityAttribute was applied to disable exception wrapping."); } int main() { run(); return 0; }
Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Show: