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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈