How to invoke VB static methods?

What activity should I use to invoke a VB.NET static method?
ie. trying to use System.IO.File.Exists > I used Invoke Method; in target object i added System.IO.File while in MethodName i wrote “Exists”. The error appears in the target object field > “File cannot be used as expression”

Any ideas?

Pass “System.IO.File” in Target Type

In the parameters collection (in Properties) did you pass the file path

1 Like

What @vvaidya said, but also with non-void static methods you can normally use them in expressions, f.e. in assign or if
bool fileExists = System.IO.File.Exists(yourPath)

1 Like