Window. The external. NativeCall & amp; & Window. The external. NativeCall (e)
External [' Call '] & amp; & External [' Call '] (e)
The above two lines of code, I want to achieve in winform + webbrowser nativeCall and Call
But actually cannot be achieved under the c #
The first line
Public string nativeCall (string) e
{
Console. WriteLine (" nativeCall ", e);
return "ok";
}
Arguably window. External. NativeCall can call, but in front of the window. The external. NativeCall judgment, the judgment code belongs to a third party, I cannot change, the cause behind the function call can't perform,
The second line so I receive
Public Func
{
Console. WriteLine (" Call ");
Return (e)=& gt;
{
Console. WriteLine (e);
return e;
};
}
Can't call, if the return type to string in front of the judge, at the back of the function cannot call
Exclude o
CodePudding user response:
Don't understand, also dare not disorderly guess, afraid of out of contextDownstairs.
CodePudding user response:
Window. External. NativeCall judge whether there is any, can lead to no arguments in c # nativeCall is called, if add parameters, is error, may be nativeCall method statement is wrongCodePudding user response:
Find a similar problemhttps://stackoverflow.com/questions/2797913/no-argument-method-on-window-external-is-invoked-when-checking-with-typeof