I'm trying to make a C# assembly that replaces an old C++ COM DLL. The new interface must have the same API so that the customers don't have to change code to support the new assembly. Sure, they might need to rebuild, but no code changes.
That said, it's all going fine, except for one method in the IDL. It's defined as this:
As you can see, it's essentially a property that takes a parameter. In VB, the code that uses this interface would look like this:
The problem is that C# does not offer properties that take parameters like this. Is there a way to get the above results in a C# COM-interop assembly?
That said, it's all going fine, except for one method in the IDL. It's defined as this:
Code:
[propget, id(3)] HRESULT Field([in] BSTR name, [out, retval] VARIANT *pVal);
Code:
Request.Field("IndustryType") = "Something"
Comment