[Mono-list] Error message
Kelly Leahy
kellyleahy@swbell.net
Sun, 13 Feb 2005 19:11:37 -0800 (PST)
This doesn't look right to me. Shouldn't there be a
current code block here? The code you pasted seems to
have the += statement right in the middle of the class
decl, rather than inside some method or a static class
initializer.
Kelly
--- Julien Sobrier <julien@sobrier.net> wrote:
> Hello,
> what does this error message means when I compile my
> code:
> syntax error, got token `OP_ADD_ASSIGN', expecting
> ABSTRACT EXTERN
> INTERNAL NEW OPERATOR OVERRIDE PRIVATE PROTECTED
> PUBLIC READONLY SEALED
> STATIC THIS UNSAFE VIRTUAL VOLATILE OPEN_BRACKET
> OPEN_PARENS DOT STAR
> IDENTIFIER
>
> It happens for this line:
> PluginListen += new EventListen(EventListenHandler);
>
>
> The code is :
> class Plugin: PluginInterface
> {
> [...]
> public event EventListen PluginListen;
>
> PluginListen += new
> EventListen(EventListenHandler);
>
> private void EventListenHandler(string
> pluginName, string
> eventName, Session userSession, Hashtable
> parameters)
> {
> //
>
> }
>
> }
>
> Where EventListen is defined in another file:
> public delegate void EventListen(string pluginName,
> string eventName,
> Session userSession, Hashtable parameters);
>
> interface PluginInterface
> {
> [...]
> event EventListen PluginListen;
> }
>
> Thanks
> Julien
> _______________________________________________
> Mono-list maillist - Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>