System.CanLoadType(DotNet) Method
Version: Available or changed with runtime version 2.0.
Tests if the specified .NET Framework type can be loaded.
Note
This method is supported only in Business Central on-premises.
Syntax
Ok := System.CanLoadType(DotNet: DotNet)
Note
This method can be invoked without specifying the data type name.
Parameters
DotNet
Type: DotNet
A variable of the DotNet data type to represent the .NET Framework type.
Return Value
Ok
Type: Boolean
Example
The following code example is based on codeunit 5300 in the CRONUS International Ltd. demonstration database.
var
OObjLibrary: DotNet "Microsoft.Dynamics.NAV.OLSync.OLSyncSupplier.OutlookObjectLibrary.'Microsoft.Dynamics.NAV.OLSync.OLSyncSupplier, Version=7.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'";
MyError: Label 'Cannot access the specified type.';
if not CanLoadType(OObjLibrary) then
Error(MyError);
See Also
Comentários
https://aka.ms/ContentUserFeedback.
Em breve: Ao longo de 2024, eliminaremos os problemas do GitHub como o mecanismo de comentários para conteúdo e o substituiremos por um novo sistema de comentários. Para obter mais informações, consulteEnviar e exibir comentários de