System.Core.dll of .NET Framework 3.5
If you have played with Visual Studio 2008, chances are that you have come across the System.Core.dll which is automatically referenced when you create any new project that targets .NET Framework v3.5. Browsing through this new DLL using the Object Browser in Visual Studio, it soon becomes apparent that it is the home of many new namespaces, including the implementation of LINQ to in-memory objects. In this short article I offer an overview of the other APIs in this new assembly:
TimeZoneInfo class: This class represents a geographical time zone. It extends and supersedes the limited functionally offered by the TimeZone class by allowing you to represent any time zone. It also allows you to easily convert between time zones, retrieve an existing time zone or create a new one, and serialize to a string and reconstruct it back from a string.
HashSet<T> class: This class is a member of System.Collections.Generic namespace and provides very fast hash-based SET operations. A set is a collection of entities that includes no duplicates and is in no particular order. Internally items are stored in an array which includes the value, the hash code associated to the value, and the index of the next element in the bucket associated with this hash code. Having a link to the next element in the bucket, makes it extremely efficient to detect duplicate items when new items are inserted. Over and above the usual Add, Remove and Contains methods, HashSet also provides set operations such as union, intersection, and symmetric difference. For more information see this blog entry.
Pipes: .NET Framework 3.5 provides managed support for Pipes in Windows. Pipes are used for inter-process communication (IPC) between processes running on the same machine, or processes running on any other Windows machine within a network. You can find the classes related to this under the System.IO.Pipes namespace and remember that both Anonymous Pipes and Named Pipes are supported. For more information and a sample see this blog post.
ReaderWriterLockSlim class: If you have ever used the System.Threading.ReaderWriterLock to achieve synchronised access to shared resources which are frequently read but infrequently updated then you probably know why we have created a new Reader/Writelock. The performance of ReaderWriterLockSlim is roughly equal to that of Monitor and in some scenarios it is more scalable than its predecessor. It supports Read, Write and UpgradeableRead lock modes and it gives priority to write requests over reads. For more information see this blog.
Other: System.Core.dll offers managed wrappers to native APIs such as the Event Tracing for Windows (ETW), Performance Counters in Windows Vista and the Next Generation of Cryptography (CNG). Exploring those namespaces is left as an exercise for the reader.
System.Core.dll is only one of the many new assemblies that are part of .NET Framework v3.5. Now is a great time to get ahead of the rest and evaluate Visual Studio 2008.