RuntimeCompatibilityAttribute.WrapNonExceptionThrows Propiedad

Definición

Obtiene o establece un valor que indica si se deben ajustar las excepciones que no derivan de la Exception clase con un RuntimeWrappedException objeto .

public:
 property bool WrapNonExceptionThrows { bool get(); void set(bool value); };
public bool WrapNonExceptionThrows { get; set; }
member this.WrapNonExceptionThrows : bool with get, set
Public Property WrapNonExceptionThrows As Boolean

Valor de propiedad

true si las excepciones que no derivan de la Exception clase deben aparecer ajustadas con un RuntimeWrappedException objeto ; en caso contrario, false.

Ejemplos

En el ejemplo de código siguiente se aplica el atributo a un ensamblado para deshabilitar el RuntimeCompatibilityAttribute ajuste de excepciones.

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;
}

Se aplica a