Lambda's are a fancy way of doing anonymous delegates. For 2.0, you could try:
target.Stub(delegate(IModel t) { return t.Setting; }).Return(SettingType.Foo);
Also, for a review of how .NET has moved from delegates, to anonymous
delegates and finally to lambdas, see this:
http://weblogs.asp.net/psteele/archive/2008/12/15/loops-conversions-and-lambdas.aspx
---
Patrick Steele
http://weblogs.asp.net/psteele
On Fri, Mar 19, 2010 at 4:07 PM, Mike <[email protected]> wrote:
> I'm using .NET 2.0
>
> Does this syntax still work? Im not familiar with Lambda syntax.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Rhino.Mocks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rhinomocks?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Rhino.Mocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rhinomocks?hl=en.