Simplified COM Interop in .NET 4

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

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 name. ...

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

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