Creating an IE plug-in

I was recently approached by a customer about an intriguing project, unfortunately I can’t tell you too much about it since I’m under an NDA, but it involved creating an add-in for Internet Explorer and a custom Windows Service which would act as the backend. I’ve never created any add-ins for IE before but as a long time Windows developer I know that the Microsoft web browser is heavily dependent on COM. Since I’ve been doing mainly .NET development for the last 10 years or so, and sort of left the COM world behind me, I first started looking for … Continue reading Creating an IE plug-in

Visual Studio SP1 is released

As of today at 10:00 AM PST (19:00 CET) the Visual Studio 2010 SP1 is available for MSDN subscribers. If you don’t have an MSDN subscription you have to wait until Thursday, March 10 before you can download it. If you already have beta 1 of the service pack installed you don’t have to uninstall that before you install the RTM version since it will be upgraded.

When OOP stinks and when you instead should leave a smell behind…

I just saw an interesting video blog post by the CTO of Devexpress entitled Pac-Man and Object-Oriented Programming, in which Julian talks about how we’ve been doing object-oriented programming for 20 years now (or even more than that if you come from the SmallTalk world) and how we, as OOP/OOD programmers and designers think about programming. He then quickly moves on to comparing that to a game of Pac-Man. Now Pac-Man was a great video game developed by Namco in Japan back in 1979 and it was released in Europe and the US the year after. The game was an … Continue reading When OOP stinks and when you instead should leave a smell behind…

Microsoft is switching the light but will it turn on or off?

During the VSLive! keynote in Redmond, Microsoft yesterday announced a new Visual Studio product called LightSwitch. LightSwitch is a new SKU for Visual Studio that will allow people to create line of business (LOB) applications for the desktop and the cloud without writing a single line of code. It will also be shipped with future version of Visual Studio Pro and above. In a way it reminds me of Access but with the difference that it can use different data sources, including Sharepoint and Azure SQL. Since the announcement there have been a wild discussion within the MVP programmers community, … Continue reading Microsoft is switching the light but will it turn on or off?

Develop for Windows 7

Have you any plans on starting to develop applications for Windows 7 yet? The Windows API Code Pack can be used to access some of the new features in Win7, but also some existing features in older version of the Windows OS. The team at Microsoft that are behind the code pack have just updated all the sample code so they now come in both VB as well as in C#, and they did a very good job with it too. So go have a look, it’s pretty neat. Have fun.

Go for the Generic brand…

Before .Net 2.0 the only way that you could use a generic type was to use System.Object. Although it’s been 4 years since the release of .Net 2.0 I still see developers using the System.Object way too often, which leads to unnecessary boxing/unboxing and casting. So in this article I’m going to explain how you can use Generics in your classes and methods. What are Generics? I entitled this article “Go for the Generic brand” because outside the world of programming the term generic means something that is not tied to a particular brand name. You may buy a bottle … Continue reading Go for the Generic brand…

GetType and TypeOf confusion

Both VB and C# have an operator called TypeOf (or typeof in C#) but they perform two completely different things. In VB there are also two kind of GetType() calls, the object.GetType() method which is part of the .Net framework and the VB language specific GetType() operator. Are you confused yet? Don’t worry, in this article I will try to explain the difference between these operators and the object.GetType() method. The TypeOf, typeof, GetType operators The VB TypeOf operator is used together with the Is keyword and is used for checking if an object is of a particular type. result … Continue reading GetType and TypeOf confusion

Boxing and Unboxing in .Net

In this article I will try to explain the concepts of Boxing and Unboxing. There are two types of objects within the .Net framework, value types and reference types. Value types are stored on the stack while reference types are always stored on the heap. Converting a value type into a reference type is called Boxing while converting it back from a reference type to a value type is called Unboxing. Value Types Value types are primitive types like System.Int32 (Integer in VB, int in C#) or System.Double. These types are mapped directly to the Framework Class Library (FCL) and … Continue reading Boxing and Unboxing in .Net

Nifty extension methods

One of my favorite features in .Net 3.5 is the ability to extend a class using extension methods. Earlier you could only extend a class either by creating a new class that inherits from the first class or you could create a partial class. Of course if you have the source code of the original class you could just write the new code directly in it and recompile it. In many cases you don’t have access to the source code of a class and if the class is also sealed (NotInheritable in VB) you would not be able to extend … Continue reading Nifty extension methods

Oracle gets decorated by Microsoft… with an Obsolete Attribute

About a week ago Microsoft announced that the System.Data.OracleClient namespace will be deprecated in .Net 4.0. However the fact is that “deprecated” doesn’t mean it will disappear completely anytime soon. In fact the official statement clearly states the following: Microsoft will continue to provide hotfixes for critical issues in System.Data.OracleClient as per the standard support policy for .Net Framework 4.0. We will also continue to make critical bug fixes in future service packs for .Net Framework 4.0. So it will probably hang around for another 8-10 years so your old application doesn’t have to be updated for some time yet. … Continue reading Oracle gets decorated by Microsoft… with an Obsolete Attribute