System.Core.dll of .NET Framework 3.5

System.Core.dll of .NET Framework 3.5

  • Comments 2

I recently wrote an MSDN Flash article on the hidden gems of System.Core.dll of .NET Framework 3.5 which was published in the October issue of the MSDN Flash. Here is a copy of that article:

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/Write lock. 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.

Leave a Comment
  • Please add 5 and 5 and type the answer here:
  • Post
  • PingBack from http://msdnrss.thecoderblogs.com/2007/11/07/systemcoredll-of-net-framework-35/

  • Hi Pedram,

    I'd like to benchmark the AesCryptoServiceProvider. In my managed C++ project, I receive "error C2065: 'AesCryptoServiceProvider' : undeclared identifier". Using the Object Browser, AesCryptoServiceProvider _is not_ a part of System::Security::Cryptography.

    How does one force Windows XP SP3/VS 2008 to use a reference to .Net 3.5/System.Core.dll? I seem to be getting a reference to the 2.0 stuff in Visual Studio 2008 (despite Help->About stating 3.5 Framework)? More disturbing is the fact that though the Server 2008 SDK is installed (v6.1), there is no System.Core.dll in ...\WINDOWS\.Net\...\3.5\...

    This is a development machine with VS2003, VS2005, and VS2008. In addition, it has .Net Framework 1.1, 2.0, 3.0, 3.5, and the Compact Framework.

    Thanks in Advance,

    Jeff

    Jeffrey Walton

    noloader, gmail account

Page 1 of 1 (2 items)