# Wednesday, July 18, 2007
« Recursively Deleting a Directory - Take ... | Main | Force DB Drop »
Unfortunately I found myself needing to use an out parameter in a legacy codebase, but couldn't figure out how to get it to work correctly with Rhino Mocks.  It turns out there's a special syntax for that.

From: http://en.wikibooks.org/wiki/How_to_Use_Rhino_Mocks/Out_and_Ref_Parameters

int theRef = 42;
int theOut = 0;
Expect.Call(obj.MyMethod(ref theRef, 0, out theOut)).Return(True).OutRef(13, 666)


Comments are closed.