Skip to content

Tag Archives: best-practice

You don’t always need a lambda expression

01-Nov-09

C# 3 gave us the lambda expression and ever since we have been using them to create abstract representations of terse, anonymous functions.

While expressive and helpful, they are not always needed. Consider this example:

using System; using System.Collections.Generic; class Example { static void Main() { [...]

Know your framework

13-Oct-09

What is wrong with the following program?

using System; using System.Net; using System.IO; using System.Text; class Example { static void Main() { Console.WriteLine( getWebPage(“http://example.com”)); } static String getWebPage(String url) [...]