У меня есть класс C ++ / CLI:
public ref class Foobar
{
public:
// methods here etc..
// operator overload
double operator[](int index);
}
Как мне получить доступ к Foobar
из C #, если я пробовал:
Foobar foo = new Foobar();
int i = foo[1];
и я получаю CS0021: Cannot apply indexing with [] to an expression of type 'Foobar'