Memory allocation for pointers in C#
Forums:
unsafe {
//pointer to int value
int* pInt = stackalloc int[1];
*pInt = 50; //->Error
//pointer to double
double* pDouble = stackalloc double[1];
double d = 3.14;
*pDouble = d;
}
- Log in to post comments