c++ cli - Confusing between Native and Managed in CPP/CLI? -
if use /clr mode compile code has somthing following:
int x = 3; char ch='a'; int arr[]="hi"; array<int>^ manarr1={44}; array<int>^ manarr2= gcnew array<int> {44};
my questions now: type int
mapped system::int32
?? , char ch
? considerd native or managed type? executed! through msil or not!!
we see int arr[]
native array, mean executed out of msil?
the last question ,, both managed array manarr1
& manarr2
difference between 2 initialization ??
when compiling /clr
, entire program converted msil unless use #pragma managed(off)
or #pragma unmanaged
int
equivalentsystem::int32
char
equivalentsystem::sbyte
(notsystem::char
!)- both of these types "primitive". managed code sees them managed types , native code sees native types.
- native arrays use unverifiable msil (same c# pointers, example)
Comments
Post a Comment