A curious subtlety about how CLR does interface dispatch on array types

This post is about some internal CLR magic that usually makes accessing .NET arrays through an interface up to 100 times faster (if you’re an optimist; or accessing arrays up to 100 times slower in the worst case, if you’re a pessimist). I’m usually very curious about how this universe works under the hood -…

15

Live Geometry with Silverlight 2

I’m happy to announce a project I started on CodePlex: http://codeplex.com/DynamicGeometry Live preview at: http://geometry.osenkov.com Dynamic geometry In a nutshell, it’s an interactive designer for ruler-and-compass constructions – it lets you plot points, connect them with lines, construct circles, intersection points, parallel lines – everything that you usually do with "plain" geometry. But then the…

24

MEF: Microsoft’s Managed Extensibility Framework

Krzysztof Cwalina announced that Microsoft has released a CTP of its Managed Extensibility Framework (MEF). MEF is basically a dependency injection framework that allows to provide extensibility for your applications (add-in/plug-in framework). Also, it’s a very good way to componentize your application’s architecture and make components/layers pluggable and replacible. Here’s a very good overview of…

2

Testing

If you’re interested in testing or would like to learn more about it, here are a couple of links: MSDN recently announced Tester Center: http://msdn.com/testercenter – this is a centralized resource about testing from Microsoft. Quote: "The Microsoft Tester Center showcases the test discipline as an integral part of the application lifecycle, describes test roles…

10

Algorithms in C#: Connected Component Labeling

I have to admit, I’m not very good at interviews. For some reason my mind isn’t trained well for sorting linked lists or balancing binary trees on the whiteboard. I have no problem designing 600+ type hierarchies and building complex object-oriented frameworks, but typical interview questions were never an area where I was shining. Maybe…

11

How to determine the .NET installation directory and CLR version

I recently discovered the System.Runtime.InteropServices.RuntimeEnvironment class, especially RuntimeEnvironment.GetRuntimeDirectory(). Also, RuntimeEnvironment.GetSystemVersion() gets the version of the CLR that is running the current process.

0

How to map a Visual Studio macro to a keyboard shortcut?

The complete answer is here: http://msdn.microsoft.com/en-us/library/a0003t62.aspx Excerpt: Choose Options on the Tools menu to display the Options dialog box. In the Environment folder, click Keyboard. In the Show commands containing box, type "macros." Once you do this, all commands beginning with the word "macros" appear in the commands list. Scroll down the list to your…

4

More blogging goodness from C# IDE QA

I’m very happy to announce that two of my team members have started blogging. Eric Maino (http://blogs.msdn.com/eric) is our infrastructure expert and, as Charlie puts it quite correctly, one of QA’s finest engineers. Also, Eric has a misfortune of having been appointed as my own personal dedicated mentor, which means he answers all sorts of…

0

Book review: Jon Skeet’s C# in Depth

If you share some of my interests (like writing clean code, or, even better, writing clean code in C#), you’ll already know and love Jon Skeet’s Coding Blog. If you enjoy Jon’s blog as I do, then there’s some really good news: Jon has actually written a book about C# called C# in Depth (http://csharpindepth.com)….

3

Coding productivity: macros, shortcuts and snippets

Visual Studio macros are a fantastic productivity booster, which is often under-estimated. It’s so easy to record a macro for your repetitive action and then just play it back. Even better, map a macro to a keyboard shortcut. I’ll share a couple of examples. InsertCurlies If you open up Visual Studio and type in this…

19