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:
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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.