This article (which discussed new features in C# 4.0) includes the following text in the 'Improved COM Interop' section:
excelApp.Range[“A1”, “B3”].AutoFormat( Excel.XlRangeAutoFormat.xlRangeAutoFormatClassic2);
...this code uses one more new feature: indexed properties (take a closer look at those square brackets after Range.) But this feature is available only for COM interop; you cannot create your own indexed properties in C# 4.0.
My question is: what exactly does "available" mean?
One scenario seems to be that you can CONSUME in C# a COM interface which includes indexed properties - is this accurate? It appears to be what is shown in the Excel example. I assume then that COM IDL has a syntax for this?
But there is also a second possible meaning - can you EXPORT TO COM a C# class/interface and make it appear to have an indexed property? For instance, by using some attribute to make the COM interface have an indexed property.
There could be other interpretations.
I do understand that you can't create a property in C# itself which naturally accepts indexed notation.
Maybe someone can cite / provide some simple examples which clarify what is/is not possible?
(The above text was also mentioned in another question, but the focus of that question was not the COM-related features, but the lack of general indexed properties in C#. I'm specifically asking about the COM interop aspect of this).