DynamicILInfo.SetExceptions Method

Definition

Sets the exception metadata for the associated dynamic method.

Overloads

SetExceptions(Byte[])

Sets the exception metadata for the associated dynamic method.

SetExceptions(Byte*, Int32)

Sets the exception metadata for the associated dynamic method.

SetExceptions(Byte[])

Source:
DynamicILGenerator.cs
Source:
DynamicILGenerator.cs
Source:
DynamicILGenerator.cs

Sets the exception metadata for the associated dynamic method.

public:
 void SetExceptions(cli::array <System::Byte> ^ exceptions);
public void SetExceptions (byte[]? exceptions);
public void SetExceptions (byte[] exceptions);
member this.SetExceptions : byte[] -> unit
Public Sub SetExceptions (exceptions As Byte())

Parameters

exceptions
Byte[]

An array that contains the exception metadata.

Remarks

The exception metadata for a method defines the location and size of all try, catch, finally, filter, and fault blocks. For information on the layout of this metadata, see the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see ECMA 335 Common Language Infrastructure (CLI).

Applies to

SetExceptions(Byte*, Int32)

Source:
DynamicILGenerator.cs
Source:
DynamicILGenerator.cs
Source:
DynamicILGenerator.cs

Important

This API is not CLS-compliant.

CLS-compliant alternative
System.Reflection.Emit.DynamicILInfo.SetExceptions(Byte[])

Sets the exception metadata for the associated dynamic method.

public:
 void SetExceptions(System::Byte* exceptions, int exceptionsSize);
[System.CLSCompliant(false)]
public void SetExceptions (byte* exceptions, int exceptionsSize);
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
public void SetExceptions (byte* exceptions, int exceptionsSize);
[<System.CLSCompliant(false)>]
member this.SetExceptions : nativeptr<byte> * int -> unit
[<System.CLSCompliant(false)>]
[<System.Security.SecurityCritical>]
member this.SetExceptions : nativeptr<byte> * int -> unit

Parameters

exceptions
Byte*

A pointer to a byte array containing the exception metadata.

exceptionsSize
Int32

The number of bytes of exception metadata.

Attributes

Exceptions

exceptions is null and exceptionSize is greater than 0.

exceptionSize is less than 0.

Remarks

The exception metadata for a method defines the location and size of all try, catch, finally, filter, and fault blocks. For information on the layout of this metadata, see the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics" and "Partition III: CIL Instruction Set". For more information, see ECMA 335 Common Language Infrastructure (CLI).

Applies to