"Carl Daniel [VC++ MVP]" <
[email protected]>
wrote in message | Willy Denoyette [MVP] wrote:
| > | >> If I compile with /clr:safe, which is exactly meant by saying I can't
| >> use "Native Types" in my code? Is a native type something such as
| >> float, short, or int?
| >>
| >> Thanks,
| >>
| >> Gary
| >
| > No, native types are types like pointers (int* blabla) user defined
| > native types (class, struct...) C++ intrinsic types like wchar_t etc..
| > Primitive types like int, short, float, double ... are directly
| > mapped to the corresponding CLR types System::Int32, Int16, Float,
| > Double ..
|
| wchar_t maps to System::Char in managed C++, so it's fine for /clr:safe as
| well as the other intrinsic types you mentioned.
|
Very true, but it's usage is somewhat limitted.
wchar_t wch = 'A'; // is OK
but...
wchar_t* wsp = L"Test";
wchar_t wch[] = L"123";
are not..
Willy.