I am writing a \"Monitor\" object to facilitate debugging of my app. This Monitor object can be accessed at run time from an IronPython interpreter. My question is, is it po
You can literally take a pointer to a value type using usafe code
usafe
public class Foo { public int a; } unsafe static class Program { static void Main(string[] args) { var f=new Foo() { a=1 }; // f.a = 1 fixed(int* ptr=&f.a) { *ptr=2; } // f.a = 2 } }