|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Keyword |
Domain |
Default access |
Equivalent |
Used by |
|---|---|---|---|---|
|
|
native |
private |
class in C++ |
value, native pointer or reference |
|
|
native |
public |
struct in C++ |
value, native pointer or reference |
|
|
managed |
private |
class in C# |
managed reference |
|
|
managed |
public |
class in C# |
managed reference |
|
|
managed |
private |
struct in C# |
value |
|
|
managed |
public |
struct in C# |
value |
|
Operation |
Native Code |
Managed Code |
|---|---|---|
|
Pointer definition Pointer dereference |
* |
^ |
|
Reference definition Address-of |
& |
% |
|
Member access |
-> |
-> |
|
Allocation |
new |
gcnew |
|
Deallocation |
delete |
delete (calls Dispose) |
|
.NET type |
C++/CLI |
|---|---|
|
Char |
wchar_t |
|
Boolean |
bool |
|
Byte |
unsigned char |
|
SByte |
char |
|
Int16 |
short |
|
UInt16 |
unsigned short |
|
Int32 |
int, long |
|
UInt32 |
unsigned int, unsigned long |
|
Int64 |
long long |
|
UInt64 |
unsigned long long |
|
Double |
double |
|
Single |
float |