IForeMethods.RemoveByKey

Syntax

RemoveByKey(Key: Integer);

Parameters

Key is a custom method key.

Description

The RemoveByKey method removes a custom method from the collection by its key.

Example

Executing the example requires that the repository contains an area of the global parameters with the SHARED_P identifier.

Sub Main;

Var

mb: IMetabase;

Shp: ISharedParams;

UserMeth: IForeMethods;

uMethod: IForeMethod;

Begin

mb := MetabaseClass.Active;

Shp := mb.ItemById("SHARED_P").Bind As ISharedParams;

UserMeth := Shp.Methods;

uMethod := UserMeth.FindByKey(1);

If uMethod <> Null

Then UserMeth.RemoveByKey(1);

End If;

End Sub Main;

After executing the example the custom method with the "1" key is searched in the area of global parameters. If the method is found, it is removed.

See also:

IForeMethods