Question
· 9 hr ago

Net Gateway How to instantiate a Class with a Constructor with a parameter

I have been trying to get to grips with the new dot Net Gateway used in IRIS as the import of the DLL to construct proxy classes is no longer supported in IRIS I have a third party DLL that when I try to instantiate throws an error complaining about the class not instantiated as it does not support parameterless constructor .I am using this new 

set gateway = $system.external.getDotNetGateway()
do gateway.addToPath(myPath_"\DotNetGatewaySamples.dll")

 

I would like then to instantiate my class which has a constructor that requires a parameter, how am I suppose to achieve that and if there is a documentation that explains this in depth that I missed please direct me to it thank you. This is what I have tried and it compiles with errors

set remoteObj=gateway.new("parametisedClass(theparameter)")
Product version: IRIS 2024.2
$ZV: IRIS for Windows (x86-64) 2024.1 (Build 267_2U)
Discussion (5)2
Log in or sign up to continue