HowTo: Raise a event where event handler has a ref parameter

26 views
Skip to first unread message

Rainer Queck

unread,
Aug 8, 2012, 2:21:22 AM8/8/12
to rhino...@googlegroups.com
Hello Group,

using RhinoMocks I would like to raise a event, where the event handler signature looks like:
MyEventHandler(int a value, ref bool handled) {..}

If I use:
myMock.Raise(x => x.MyEventHandler += null, aValue, handled);

I get the following Error message:
System.InvalidOperationException: Parameter #2 is System.Boolean but should be System.Boolean&

What Is the right way to raise the event?

Thanks for Help and Hints
Rainer

Reply all
Reply to author
Forward
0 new messages