Skip to content

Instantly share code, notes, and snippets.

@noncom
noncom / chararraymarshal.cs
Created March 5, 2023 01:37 — forked from Laeeth/chararraymarshal.cs
csharp marshalling code
using System;
using System.Dynamic;
using System.Runtime.InteropServices;
namespace Symmetry.Xenon.Model.Marshalling
{
/**
* Base for Marshallers which need a buffer and a size - basically for wrapping binary data.
*/
public abstract class CharArrayMarshaller : DualAllocationMarshaller
@noncom
noncom / gist:d90bba286f2d8ee58ca74f342667d6a3
Created March 4, 2023 16:15 — forked from ChadSki/gist:7992383
Dynamically define C# value types (structs) at runtime with a dynamic assembly
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.InteropServices;
using System.Text;
namespace DevConsole
{