Изменить

Поделиться через


SuppressDispose attribute

Version: Available or changed with runtime version 1.0.

Specifies if a Microsoft .NET Framework object that is defined by a DotNet variable is disposed when it goes out of scope.

Note

This attribute is supported only in Business Central on-premises.

Applies to

  • Variable

Syntax

[SuppressDispose]

Remarks

The SuppressDispose attribute applies to local variables of the DotNet data type.

When a local .NET Framework object is disposed, it can't be assigned outside the scope of its local function. If you want to assign the local DotNet variable to a global AL or .NET Framework object, then you set the SuppressDispose property to Yes.

Get Started with AL
Developing Extensions