Code: Select all
Interop.ExecuteJavaScript("$0()", (Action)myCSMethod)
However, I need to be able to return a string, or an array, from my CS Function, so I tried replacing "Action" with "Func<string>" as seen below, but I receive the following error.
Code: Select all
Interop.ExecuteJavaScript("alert($0())", (Func<string>)myGetStringFunction)
How do I pass a Value-Function, not an Action or void, to JS Interop?