Initializing a wchar_t __gc[] Array 
Author Message
 Initializing a wchar_t __gc[] Array

The String::Split method takes a wchar_t __gc[] parameter.  Could someone
please explain how I might initialize this animal?  I've tried every
combination I know.



Fri, 14 Jan 2005 22:53:49 GMT  
 Initializing a wchar_t __gc[] Array
Here is a sample code:

wchar_t wstrarr __gc[] = new wchar_t __gc[2];
wstrarr[0] = L' ';
wstrarr[1] = L'\n';
String* str =S"Hello there\n!!!";
String* strarr[] = str->Split(wstrarr);
for(int i=0; i<strarr->Length; ++i)
    Console::WriteLine(strarr[i]);


Quote:

> The String::Split method takes a wchar_t __gc[] parameter.  Could someone
> please explain how I might initialize this animal?  I've tried every
> combination I know.



Fri, 14 Jan 2005 23:52:51 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Object __gc* to Object __gc* __gc* ?

2. __gc or not __gc

3. Question about __gc * __gc *

4. gc arrays

5. __gc Array Basics

6. Passing __gc arrays in parameters

7. How to manage array of __gc pointers

8. Compiler error: invalid type for __gc array element

9. Initialize array from members of a struct: Legal ?

10. How can I initialize an array?

11. initializing an array using specific subscripts

12. Initializing array elements in ctor-initial

 

 
Powered by phpBB® Forum Software