C#: Extending Outlook.(_)Application.

Does not work.

Outlook.Application and Outlook._Application are both interfaces. And I want to use them as a class in my program (I don’t know how they made that work).

I wanted to extend Outlook.Application and add a simple method to create a new email. But that does not work since you have to implement a bunch of methods which I hardly understand.

Thank Microsoft for creating extension methods, so here is my solution:

using System;
using Outlook = Microsoft.Office.Interop.Outlook;

namespace SendToExtended
{
	static class OutlookExtensions
	{
		///

		/// Creates and returns an Microsoft Outlook MailItem
		/// 

		///
an instantiated Outlook application
		/// A new MailItem object
		public static Outlook.MailItem CreateMailItem(this Outlook.Application outlook)
		{
			if (outlook == null)
				throw new ArgumentException("outlook parameter cannot be null");

			return (Outlook.MailItem)outlook.CreateItem(Outlook.OlItemType.olMailItem);
		}
	}
}

USA: Thinks I like over here in general

  • The cars… BIG cars. Big engines. Beautiful sound. (yes I don’t care for pollution.)
  • The fuel price (gas (what we call ‘Benzine’) is 4 times as cheap).
  • Driving on the left side is allowed.
  • Passing on the right is allowed.
  • Motorcyclists don’t need to wear helmets.
  • Refills on drinks! (and on a lot of sides too).
  • Driving from 16.
  • The friendly people over here.
  • The tipping in restaurants which makes the waiters and waitresses a lot more friendly.
  • Flavors in the store. SO many.
  • (also a flavor, but it’s SO important:) Maple syrup!
  • Guns are allowed. Over here you still have the right to protect your property. We gave that up long ago in Belgium.
  • Everybody here is American in the first place. And then they are Christian / muslim / whatever…
  • The school system (I wrote about that in my previous post).
  • The government is not ‘Big Brother’ over here.

Let me elaborate on the last one: A lot of Americans do think that their government is Big Brother, while compared to what we have in Belgium, theirs is really not that worse. We’ve got social security which some people think is good (I don’t) since a lot of people have to pay for somebody else’s disease (like when they need new lungs because of cancer).

Also the government over here did not sign the Kyoto protocol, they don’t ask ridiculous taxes on gas / electricity / … that is really a cash cow in Belgium. And on the cars: over here you pay insurance and some taxes. In Belgium those IDIOTS ask taxes based on your engine’s cc (2.0 liter, 2.5 liter …). Just sad.

While every medal has it’s downside: here are the ones I discovered:

  • There is no mandatory car checkup each year.
  • Drinking age is 21.
  • McCain is not president.

USA: As a student…

Here are some of the things why I think the USA is a better environment for studying in university as compared to a Belgian one. I’ve done some thinking on this for a while, so I thought I might share it with you :)

Things that are better:

  1. Classes are smaller (on this campus).
  2. There is a lot more to do on campus
  3. You can pick your own classes instead of a defined set of classes, where 30% is a time filler.
  4. Classes don’t take 24 hours a week (they do take that much in total).

Let me elaborate on that:

  1. Classes are a lot more expensive over here, so only the really interested students are in class over here. Complaining that people with less money can’t send their kids to school are pointless, since the really good students get scholarships. So if they are really interested they will get their tuition paid.
  2. Campus over here is a life on it’s own. A lot of students live on campus, there is always something to do (and I don’t mean partying by that).
  3. You have to take a big % on your major, and a small % on your minors. So you still can choose what you like, while that is a lot more limited in Belgium.
  4. You talk in class about a subject, you don’t do tasks in class, you do the task at home.

And extra note on number 1.: I know a lot of people in Belgium (and over here too) think that everybody should get the possibility to study. Well imagine a class full of students, where the first 2 rows wants to BE in that class, the third row just choose Computer Science because it’s the future, and the last row just playing Counter-Strike.

Since it’s that cheap to do the year again they don’t care (and thus ruining the class for everybody). Been there, done that, never got the T-shirt. The American system IS better.

And after all there are downsides, one of ‘m is (it actually depends on the teacher over here):

  1. You don’t get 2nd changes if you fail an exam. While the Belgians get that.