to write to it (the second param of WriteDWORD is the value)
code:
var RECT = Interop.Allocate(16); //long = 4 so size = 4 * 4
RECT.WriteDWORD(0, 0); //left
RECT.WriteDWORD(4, 0); //Top
RECT.WriteDWORD(8, 0); //Right
RECT.WriteDWORD(12, 0); //Bottom
to read it
code:
var RECT = Interop.Allocate(16); //long = 4 so size = 4 * 4
//pass to some api function where it changes it
var left = RECT.ReadDWORD(0); //left
var top = RECT.ReadDWORD(4); //Top
var right = RECT.ReadDWORD(8); //Right
var bottom = RECT.ReadDWORD(12); //Bottom