> I have a C# class :
>
[quoted text clipped - 9 lines]
> MyClass ^ myClass = gcnew MyClass();
> myClass->????
How do you access it in C#?
Regards,
Ioannis Vranos
Lei Jiang - 14 Jul 2004 15:39 GMT
In C#, just use myClass[index].
But I have found the answer now :
myClass->get_Item(index)
> > I have a C# class :
> >
[quoted text clipped - 15 lines]
>
> Ioannis Vranos
Ioannis Vranos - 14 Jul 2004 17:26 GMT
> In C#, just use myClass[index].
>
[quoted text clipped - 10 lines]
>>> }
>>>}
This is an indexed property so you can also use the [] operator in C++
the same way you do in C#.
Regards,
Ioannis Vranos
> I have a C# class :
>
[quoted text clipped - 9 lines]
> MyClass ^ myClass = gcnew MyClass();
> myClass->????
The name of the indexed property is Item. C# uses that name by default, but
a few classes have a different name. In the new C++ syntax, you will be able
to access C# indexers with the same syntax (i.e. directly on the class
instance). Of course, C++ will still have named indexed properties if you
find them useful.

Signature
Brandon Bray, Visual C++ Compiler http://blogs.msdn.com/branbray/
This posting is provided AS IS with no warranties, and confers no rights.