P/Invoke Marshal.StructuretoPtr

In this blog I am going to talk about Marshal.StructuretoPtr , especially its last parameter fDeleteOld. Although its msdn description is pretty concise but I have seen it to be a source of confusion a lot of times. Following is what it says: fDeleteOld Type: System..::.Booleantrue to have the Marshal..::.DestroyStructure method called on the ptr…

7