Dot Net Solutions
George V Place,
4 Thames Avenue
Windsor
Berkshire
SL4 1QP
Great Britain
0845 402 1752
GEO: -0.606174, 51.4843
 
 
 
 
21 Jan 2010

Quick: ReadOnlyDictionary

I've seen a few posts on other blogs commenting on the lack of a ReadOnlyDictionary in the .NET framework, often with implementations which wrap a regular Dictionary and prevent modification. I thought I'd point out a solution to this problem which is provided in the Base Class Library: IEnumerable<KeyValuePair<TKey, TValue>> That's it. And it's what's returned if you call dictionary.AsEnumerable(). The consumer of your class can convert it back into a Dictionary by passing it int ... [Read more]
Published: 21 Jan 2010  03:09 | 0  Comments | 0  Links to this post
 
 
 
 
19 Jan 2010

My .NET Framework – Part 2: Properties

This is the second in a series of posts on useful extensions to the .NET Framework. Part one is here. Basic and Automatic Properties In the first two major releases of the C# language, properties were implemented as a (usually private) field with a hand-coded property which regulated access to the value of that field, like so: class Foo{ private string _name; public string Name { get { return _name; } set { _name = value; } } } At build time, the ... [Read more]
Published: 19 Jan 2010  03:09 | 0  Comments | 0  Links to this post
 
 
 
 
15 Jan 2010

My .NET Framework – Intro & Part 1

Intro I’ve just started here at Dot Net Solutions after eight years at my last job. That means that nearly all my experience with .NET and Visual Studio 20xx happened at that one place, and over that time I built up quite a collection of “accessories”. Some of those were tools, utilities and plug-ins which I’m gradually tracking down and re-installing each time I reflexively go to do something and it’s not there or it doesn’t work: for instance, it turns out that “Edit with Vim” is not a stand ... [Read more]
Published: 15 Jan 2010  02:56 | 0  Comments | 0  Links to this post