IForeNETAssembly.EntryPoint

Syntax

EntryPoint: String;

Description

The EntryPoint property determines the entry point of .NET assembly.

Comments

By default, this property has a null value, while at startup of the .NET assembly the static method of Main Program class of namespace with name, corresponding to identifier of created .NET assembly, is run.

As the value of this property, it is possible to specify the qualified identifier of the form class, or a qualified identifier of the class that contains the static Main method with the specified signature.

If an invalid or non-existent entry point is specified, an exception will be thrown at the .NET assembly start.

Example

Executing this example requires that the repository contains a .NET assembly with the NETAssembly_1 identifier. This .NET assembly contains a .NET form with the MainForm identifier.

Sub UserProc;
Var
    MB: IMetabase;
    NETAssembly: IForeNETAssembly;
Begin
    MB := MetabaseClass.Active;
    NETAssembly := MB.ItemById("NETAssembly_1").Edit As IForeNETAssembly;
    NETAssembly.EntryPoint := "NETAssembly_1.MainForm";
    (NETAssembly As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the entry point is indicated for .NET assembly. The form MainForm is run at startup of the .NET assembly.

See also:

IForeNETAssembly