Which memory model?

In his blog, Eric Eilebrecht explains why when writing multithreaded applications today we should stick to the weak ECMA memory model instead of CLR’s much stronger memory model. In principal, I have no issue with using a weaker model than the CLR memory model but my main concern is that “at what cost are we…


CLR 2.0 memory model

Memory is usually a shared resource on multithreaded systems therefore access to it must be regulated and fully specified. This specification is often called a “Memory Model”. Optimisations performed by compilers and the emergence of multi-core processors are some of the factors testing the agility of today’s memory models. The simplest such model is the…


First look at Parallel FX and self-replicating tasks

The Parallel Computing Platform team at Microsoft has recently launched the Parallel Computing Development Centre along with our first CTP of Parallel FX. In here, I will explore some aspects of the framework. If you feel comfortable with the basics of concurrency then read on. There is obviously PLINQ and the methods defined in the…


WCF, WPF and Visual Studio 2008 in action – Student Canvas Sample

As part of my job as an Application Development Consultant (ADC) at Microsoft, I usually deliver talks on new technologies for different audiences. I am giving a talk on WCF next week and decided to put together a user friendly demo showing some of the capabilities of WCF. In this demo, both the service and…


How difficult can it be to overload operator ==?

Well apparently very difficult! Today, I read article after article on blogs that suggested weird and wonderful ways of overloading the operator == in C#. Almost all of those were incorrect! So I set myself a challenge to put the record straight: Before showing you the code, a number of things to remember: –          Overriding…


Unearthing LINQ’s hidden gems – part 1

I was writing a little application using Visual Studio 2008 today and came across a few nifty but lesser known features of LINQ and though to share those with you: How to filter queries based on the position of elements in data source System.Linq.Enumerable class provides extension methods that enable query expressions in LINQ. For…


System.Core.dll of .NET Framework 3.5

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…


A Performance Comparison of ReaderWriterLockSlim with ReaderWriterLock

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. In this MSDN Magazine’s concurrent affairs column, Jeffery Richter explains some of the short comings of the existing ReaderWriterLock in .NET Framework….


WCF Authentication: Custom Username and Password Validator

There are a number of authentication techniques supported by WCF. For instance Windows Authentication, X509 Certificates, Issued Tokens, and Username and Password are all mechanisms that can be used for authentication. These client credential types are configured as part of the binding configuration for an endpoint. For example the config section below customises the netTcpBinding…


AzMan Data Store through COM Interop

If you have an ASP.NET application, you can use the AuthorizationStoreRoleProvider which adheres to the Role Provider model expected by ASP.NET and retrieves role information from Microsoft Authorization Manager (AzMan). AzMan itself is a COM based application and all communications with the store occur through COM Introp exposed in Microsoft.Interop.Security.AzRoles namespace. If you decide not…