.NET

I’m using Red Gate’s .NET Reflector for decompiling .NET assemblies. It’s a great tool but it lacks, at least in the free version I’m using, information about the platform architecture of an assembly. Sometimes I want to know whether an assembly was built for Any CPU, x86 or x64. The tool that help you find…

Read More How To Determine the Platform Architecture for a .NET Assembly

I recently found a piece of code that can be summarized by the following sample:

As you can see there is an interface I that has two methods, F1 and F2. A is derived from X, that has a method F2, and also implements I, but only contains F1. I was puzzled at first,…

Read More Interface Implementation in C#

.NET 3.0 provides some support for working with ZIP files. However, it has an important drawback: it only works for packages that are conformant to the Open Packaging Convention standard. Most of the ZIP files are not. Codeplex features a library called DotNetZip that provides support for packing and unpacking in C#, VB.NET or any…

Read More DotNetZip Library

When you create a WPF application, the start-up window is by default one from the same project (by default called Window1.xaml).

But what if you want to use a window from another project (class library)? The pack URI scheme, used by WPF, allows you to identify and load files from: the current assembly a…

Read More Reference a XAML From Another Project

Microsoft has made available a first beta version of an experimental version of .NET 4.0, called .NET Framework 4.0 Beta 1 Enabled for Software Transactional Memory v1.0. Since that is quite a long name, the short one is STM.NET. This is a special version of .NET 4.0 that enables software transactional memory for C#. It…

Read More STM.NET

.NET allows you to expose components as COM and consume them from unmanaged code. There are many references on how to this (and you can only start with MSDN), and I will not talk about that part. What I want to explain here is something different. Suppose you have this interface:

Method GetUsers() returns…

Read More .NET out string[] to Automation SAFEARRAY**

Visual Studio 2010 has support for code contracts that allow to express pre-, post-conditions and invariants to your .NET code. Let’ say you want to create a function to return a random value in a range. This could look like it:

However, at a rough analysis one can find two problems: Second call to…

Read More Code Contracts in Visual Studio 2010

Last week Microsoft published on DevLabs a .NET language for building parallel applications, called Axum, and earlier known as Maestro. This new language is build on the architecture of the web, on the principles of isolation, message-passing, fault-tolerance, loose-coupling. It is said to have a more succinct syntax than Erlang, and have the isolation advantage…

Read More Axum, A Language for Building Parallel Applications

In perioada 6-8 aprilie va avea loc la Bucuresti la sediul Uzinexport un training de Introducere in .NET, sponsorizat de Microsoft Romania. Dupa cum explica Zoli pe blogul sau, acest training este dedicat programatorilor ├«ncepatori, juniorilor din firmele de software, programatorilor de FoxPro, Visual Basic, Java, dar si programatorilor care nu au reusit sa treaca…

Read More Introducere in .NET, 6-8 aprilie