Creating a COM indexed property from C#?

I am trying to mimic an old vb6 dll with a new .net one. The mimicry has to be perfect so that that callers don't know they are using a new .dll.

I have a curiousness though. In VB6 it has the following in the object library:

Property BankList(Index As Long) As String

But AFAIK property this can't be done in .net?

The closest I can get is creating a function that exhibits that behaviour but then the COM type goes from Property to Method.

Can anyone suggest how I would create that signature with a property?

8
задан DaveInCaz 31 January 2019 в 16:26
поделиться