String className = "User.NativeTest";
String comment = "";
try{
comment = "cmBoolean() tests whether two numbers are equal (true=1,false=0): ";
bool boolVal = iris.ClassMethodBool(className,"cmBoolean",7,7);
Console.WriteLine(comment+boolVal);
comment = "cmBytes creates byte array [72,105,33]. String value of array: ";
byte[] byteVal = iris.ClassMethodBytes(className,"cmBytes",72,105,33);
Console.WriteLine(comment+ (new String(byteVal)));
comment = "cmString() concatenates \"Hello\" + arg: ";
string stringVal = iris.ClassMethodString(className,"cmString","World");
Console.WriteLine(comment+stringVal);
comment = "cmLong() returns the sum of two numbers: ";
Long longVal = iris.ClassMethodLong(className,"cmLong",7,8);
Console.WriteLine(comment+longVal);
comment = "cmDouble() multiplies a number by 1.5: ";
Double doubleVal = iris.ClassMethodDouble(className,"cmDouble",10);
Console.WriteLine(comment+doubleVal);
comment = "cmProcedure assigns a value to global array ^cmGlobal: ";
iris.ClassMethodVoid(className,"cmVoid",67);
// Read global array ^cmGlobal and then delete it
Console.WriteLine(comment+iris.GetInteger("^cmGlobal"));
iris.Kill("cmGlobal");
comment = "cmList() returns a $LIST containing two values: ";
IRISList listVal = iris.ClassMethodList(className,"cmList","The answer is ",42);
Console.WriteLine(comment+listVal.Get(1)+listVal.Get(2));
} catch (Exception e){
Console.WriteLine("method failed");
}