Altova XMLSpy 2025 Enterprise Edition

Loads the .NET assembly with the given long assembly name or file path. Returns Boolean true if the assembly could be loaded; false otherwise.

 

Signature

CLR.LoadAssembly(strAssemblyNameCLR : String, showLoadErrors : Boolean) -> result : Boolean

 

Example

The following JScript code attempts to set the clipboard text by loading the required assembly dynamically.

 

// set clipboard text (if possible)
// System.Windows.Clipboard is part of the PresentationCore assembly, so load this assembly first:
if ( CLR.LoadAssembly( "PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", true ) )
{
   var clipboard = CLR.Static( "System.Windows.Clipboard" );
   if ( clipboard != null )
       clipboard.SetText( "HelloClipboard" );
}

© 2018-2024 Altova GmbH