C#: Smaller syntax for event handlers.

Using lambda functions you can shorten your event handlers. E.g.: With a normal event hander: class Test { private Timer timer; private void Timer_Elapsed(object sender, ElapsedEventArgs e) { Console.WriteLine(string.Format(“Object: {0} sends: {1}”, sender, e)); } public Test() { this.timer = new Timer(); this.timer.Elapsed += new ElapsedEventHandler(this.Timer_Elapsed); this.timer.Interval = 100; this.timer.Start(); } } With an anonymous […]

CodeRush Express – Useful tool for C# developers in VS.NET 2K8

(I quote): Developer Express and Microsoft are proud to announce a new version of CodeRush licensed exclusively for C# developers working in Visual Studio. The new product is called CodeRush Xpress, and it includes a fresh selection of hand-picked features taken from CodeRush and Refactor! Pro. And I love it! It has very handy functions […]