Altova UModel 2025 Professional Edition

Returns a reference to a static .NET object. You can use this function to get access to .NET types that have no instances and contain only static members.

 

Signature

CLR.Static(strTypeNameCLR : String) -> object

 

Example (JScript)

// Get the value of a .NET Enum into a variable
var enumValStretch = CLR.Static( "System.Windows.Forms.ImageLayout" ).Stretch
 
// Set the value of the Windows clipboard
var clipboard = CLR.Static( "System.Windows.Clipboard" );
clipboard.SetText( "HelloClipboard" );
 
// Check the buttons pressed by the user on a dialog box
if ( ShowForm( "FormName" ) == CLR.Static( "System.Windows.Forms.DialogResult" ).OK )
   alert( "ok" );
else
   alert( "cancel" );

© 2018-2024 Altova GmbH