sub run
regobj.new1(false)
regex1.new(",")
regobj.fromlibrary("main.regex1","reg",b4pobject(2))
str="0,1,2"
a()=regobj.runmethod2("split",str,"system.string")
msgbox(a(2))
end sub
when i run the results = 2
when i compile the results = error cs0266
what is wrong?
For information. The error occurs because RunMethod2 is declared to return an Object and the compiler sees that it is being assigned to a String[] without a cast. The IDE can cope with this as it check for the actual type of the return value but in the generated C# code the return value is statically typed as an Object and gives that error.