V
Vivienne
Hi,
I am using a c# lib in my c++ project, with VS2005 as the IDE.
class InCollection is a class defined in c# lib, its method
getMemebers() will return all of its members as a System::string[] .
Like this:
InCollection mycollection = new InCollection();
System.String[] members = mycollection.getMembers();
I want to call this method in my c++ project, so I wrote:
InCollection^ mycollection = gcnew InCollection();
System::String^[] members = mycollection->getMembers();
// here I got a compiling error. System::String^[] seems not a valid
expression.
Similar thing happened when a method take a String[] as an argument.
like:
mycollection.addMemebers(new String[] {"abc", "123"});
So how should I use the two methods?
I am using a c# lib in my c++ project, with VS2005 as the IDE.
class InCollection is a class defined in c# lib, its method
getMemebers() will return all of its members as a System::string[] .
Like this:
InCollection mycollection = new InCollection();
System.String[] members = mycollection.getMembers();
I want to call this method in my c++ project, so I wrote:
InCollection^ mycollection = gcnew InCollection();
System::String^[] members = mycollection->getMembers();
// here I got a compiling error. System::String^[] seems not a valid
expression.
Similar thing happened when a method take a String[] as an argument.
like:
mycollection.addMemebers(new String[] {"abc", "123"});
So how should I use the two methods?