how to set Anonymous delegate as one parameter for InvokeSelf ?
Posted
by KentZhou
on Stack Overflow
See other posts from Stack Overflow
or by KentZhou
Published on 2010-04-03T02:48:03Z
Indexed on
2010/04/03
2:53 UTC
Read the original article
Hit count: 475
I tried to use InvokeSelf for silverlight to communicate with html: InvokeSelf can take object[] as parameter when making a call:
ScriptObject Myjs;
ScriptObject obj = Myjs.InvokeSelf(new object[] { element }) as ScriptObject;
then I want make a call like with anonymous delegate:
Object obj;
obj = InvokeSelf(new object[] { element, delegate { OnUriLoaded(reference); } });
I got the error said: Cannot convert anonymous method to type 'object' because it is not a delegate type
How to resolve this problem?
© Stack Overflow or respective owner