Daily Archives: Monday, 18 June, 2007

Object Initialisers III

It seems that now I’ve got Lutz Roeder’s Reflector on the case with Orcas the way object initialisers work slightly different to how I expected. As it was described to me as instantiating the object followed by the property calls. However, the … Continue reading

Posted in Uncategorized | Tagged , | 1 Comment

Object Initialisers II

Following on from Gary Short‘s message from my previous post on Object Initialisers, I decided to take a screenshot of Orcas displaying the tooltips. I really have to compliment those that designed and wrote intellisense. Not only does it work … Continue reading

Posted in Uncategorized | Tagged , , | 1 Comment

Object Initialisers I

Continuing with the language enhancements in C#3.0. This post presents the concept of object initailisation. Say you have a class with a default constructor and lots of properties and you want to be able in initialise the object in one … Continue reading

Posted in Uncategorized | Tagged , | 1 Comment

A start on LINQ

I was at the Microsoft MSDN Roadshow today and I got to see some of the latest technologies being demonstrated for the first time and I’m impressed. Daniel Moth’s presentation on the Language Enhancements and LINQ was exceptional – It … Continue reading

Posted in Uncategorized | Tagged , , , , | 1 Comment

Automatic Properties

Continuing my look at the new features found in the C# 3.0 compiler I will look at Automatic Properties. public class Employee{ public string FirstName { get; set; } public string Surname { get; set; } public DateTime DateOfBirth { … Continue reading

Posted in Uncategorized | Tagged , , | 1 Comment

Extensions Methods

I’ve been looking at more of the language enhancements in C# 3.0. In this post I’m going to look at Extensions. There have been many times went a class has needed to be extended, but the additional code just doesn’t … Continue reading

Posted in Uncategorized | Tagged , , , | 2 Comments

Anonymous Types

Anonymous Types are another new feature to the C# 3.0 compiler. To create one, just supply the new keyword without a class name, followed by the, also new, object initialiser notation. As the type name is not known it needs … Continue reading

Posted in Uncategorized | Tagged , , , | 1 Comment