__gc Array Aggregate Initialization doesn't work inside a namespace (except that the method is a member of a gc class). We have to initialize each element one by one.
namespace Sample
{
void ParseString(String* str)
{
...
Char splitter[] = { ',' }; // This will cause link error
// Use the following instead
// Char splitter[] = new Char[1];
// splitter[0] = ',';
...
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment