Category Archives for ".NET"

I am officially a Microsoft C# Specialist

Yesterday, I passed the “Programming in C#” exam. This makes me officially a Microsoft C# Specialist. If you are a C# developer you should definitely try the exam! The following are the resources that I used in order to prepare for it: C# 5 in a Nutshell: The Definitive Reference Programming in C# Jump Start […]

Continue reading

5 The Iterator Pattern in .NET

The Iterator Pattern provides a way to access the elements of an aggregate object (collection) sequentially without exposing its underling representation. The ultimate goal of the pattern is to decouple the client from the implementation of the collection that always remains well encapsulated. This is definitely my favourite pattern in particular for how it is supported by […]

Continue reading

The Rapid Growth of DotNetToscana

I am absolutely impressed by the rapid growth of the .NET community in Tuscany that I contributed to found in 2008. At the time, we were three passionate people with the dream to create a community of developers around the Microsoft .NET technologies with the ultimate goals of learning together by sharing knowledge and experience. […]

Continue reading

Conditional Attribute in C#

Conditional directives in C# are extremely useful to include or exclude regions of code from compilation. This allows you to target different platforms. Consider a class Logger with a Log method. If you want to log a message only in debug mode you could do something like this. This code is ugly isn’t it? This […]

Continue reading

2 Unsafe and Fixed keywords in C#

C# allows you to manage memory directly when needed mainly for performance reasons. In order to do so you need to compile your code using the /unsafe switch. This is required because this code cannot be verified by the CLR. In Visual Studio you can enable this in the Properties panel. In this post I […]

Continue reading

The Facade Pattern in .NET

The Facade Pattern provides a unified interface to a set of interfaces in a subsystem. Facade defines a higher level interface that makes the subsystem easier to use. The Facade Pattern is the simplest of the patterns and it is something that many developers probably used a lot in the past without even knowing that […]

Continue reading

The Adapter Pattern in .NET

The Adapter Pattern converts the interface of a class into another interface the clients expect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces. The pattern is also called “Wrapper” because it is usually implemented using the technique of wrapping objects (object composition). There are different situation when the pattern can be […]

Continue reading

6 The Command Pattern in .NET

The Command Pattern encapsulates a request as an object, thereby letting you parameterize other objects with different requests, queue or log requests, and support undoable operations. The formal definition of the pattern is quite general and it shows how the pattern is versatile and can be used in many scenarios but the real important thing however is the […]

Continue reading

4 Decorator Pattern – Streams in .NET

The Decorator Pattern allows to attach additional responsibilities to an object dynamically. It is an alternative to subclassing for extending behaviour. Instead of creating a silly example of usage I decided to rely on one of the best example of implementation that is already available in the .NET Framework: the Streams. The following class diagram is […]

Continue reading
1 5 6 7
>