Arrays in F#

Yesterday I wrote about list in F#. Today I’ll write about arrays, which unlike lists are a mutable flat storage and cannot be resized. That means you have to create a new array if you want to remove or add elements. Advantages include constant look-up time and the fact that they can store a large…

Lists in F#

In this post I will talk about the lists in F#, one of the fundamental concepts of the language. What should be said from the very beginning is that list are imutable single linked list. That means whenever you change a list, a new list is created. You can declare a list in the following…

F# Projects with Visual Studio 2008

I started a few days ago to study F# and I was struggling with some things that were not good documented. I want to share what I’ve learn from that and hopefully that will help others. After you download and install F# (available at http://research.microsoft.com/fsharp/release.aspx) a new project template will be made available in VS…

Visual Studio 2008 Enum Bit Flags Visualization

I’ve recently discovered a new nice feature in the natice debugger of Visual Studio 2008: the visualization of bit flags. Let’s take this enumeration for example. Notice that each constant is basically a bit flag.

If we used those bitfields like this:

The debugger shows them like this: However, if the constants are…

MFC Feature Pack

At the beginning of January, Microsoft released a beta version of MFC Feature Pack, an exstension to the MFC shipped with Visual Studio 2008. This feature pack allows developers to create applications with the look and feel of Office, Visual Studio and Internet Explorer. MFC application can now support: Office Ribbon Office 2003, XP and…

Convert.ToInt32 versus TryParse

There are two way of converting strings to numerical values in .NET. The first one, supported since the first version of the platform, is the use of System.Convert class. It has methods like ToInt32, ToChar, ToDouble, ToDataTime, ToDecimal, etc. Here is an example of converting string “123” to numerical value 123.

The catch with…

CategoriesC#