InvokeCode with class and sub declarations

Module myfunctions

Function FindMax(ByVal num1 As Integer, ByVal num2 As Integer) As Integer
’ local variable declaration */
Dim result As Integer

If (num1 > num2) Then
result = num1
result = num2
End If
FindMax = result

End Function
Sub Main()
Dim a As Integer = 100
Dim b As Integer = 200
Dim res As Integer

res = FindMax(a, b)
Console.WriteLine(“Max value is :”, res)

End Sub
End Module

This vbscript code gives error please solve the issue


As far I know, this activity doesn’t support Class and Sub declaration. The arguments must be passed by the activity itself.

Refer to this:


1 Like

Thanks Lucas
But i have a question.
How to create function or method in invoke code using