c# - How to write to memory address? -
new pointers , unsafe world in c#. going through getting memory address of variables via pointers, move things around bit here , there etc; learning.
static unsafe void m() { var = 1; var p = &i; //gets memory location of variable here //how write location p, value of 100? }
i wondering if there way write specific location well? helps great deal see what's going around if can read , write @ same time.
no practical purposes, learning. or not possible c#?
you need dereference pointer *
operator. ex:
*p = 100;
Comments
Post a Comment