COM interop improvements with C#4.0

I already did a blog post about this some time ago: Better Office COM interop thanks to named and optional parameters

Here I talked mainly on how named and optional parameters make life easier for Office developers. This focus was more on that. But actually there are a some other points that didn’t get enough attention. Here are some other great improvements specifically for COM interop.

  • No more meaningless ref parameters.
  • Better indexer support, property accessing. No specific get/set needed anymore.
  • No more need for casting, we can use dynamic binding thanks to the Dynamic class.

I have found a screencast by Sam Ng who explains all this in about 10min.

Link to the original post –> How Do I: COM Interop and Office in C# 4.0?

No comments yet. Be the first.

Leave a reply

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word