Simplified COM Interop in .NET 4.0

Luckily for us, C# 4.0 and .NET 4.0 made the use of COM from inside managed code applications much easier thanks to a lot of related features:

Image Optional and named parameters are often used in COM APIs and have found their way into the C# programming language to simplify such scenarios. It’s not uncommon for COM APIs to expose methods with a whole bunch of parameters, most of which are optional and meant to be called by specifying their names. The use of this feature is not restricted to COM interoperability, though, so one can create methods with optional parameters and call methods by specifying parameters by ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.