Font Size: A A A   Layout: Left | Right

58bits - Tech

Six bits short of sixty four...

# Wednesday, July 16, 2008
Wednesday, July 16, 2008 8:31:47 PM (SE Asia Standard Time, UTC+07:00) (C# | Visual Studio)

Yet another tool I've been late coming to - JetBrains ReSharper.

While working though Link in Action I was experimenting with ReSharper 4.0. So cool and extremely helpful when looking at delegates and lambdas.

Here's a delegate assignment..

Predicate<DateTime> isMinimum = delegate(DateTime input) { return (input == DateTime.MinValue); };

And here's the equivalent as a lambda..

Predicate<DateTime> isMinimum = input => (input == DateTime.MinValue);

And here's the ReSharper magic that converts from lambdas to delegates and back again...

resharper4

OpenID
Please login with either your OpenID above, or your details below.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, em, i, strike, strong, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Live Comment Preview

Navigation

Search

Categories

On this page

Archive

Total Posts: 65
This Year: 39
This Month: 0
This Week: 0
Comments: 14

Sign In