Expressmapper ExpressMapper System.Reflection.Emit System.Runtime.Serialization void Main() { var to = new SampleStruct(1,"herp").Dump("A Pre-constructed struct for example."); //Excuse hacky linq plz. var propsa = typeof(SampleStruct).GetFields( BindingFlags.Instance | BindingFlags.Public).Concat(typeof(SampleStruct).GetFields(BindingFlags.Instance | BindingFlags.NonPublic)).ToArray(); var props = FormatterServices.GetObjectData(to,propsa);// typeof(SampleClass).GetProperties().ToArray()); var tp = FormatterServices.GetUninitializedObject(typeof(SampleStruct)); FormatterServices.PopulateObjectMembers(tp, propsa, new object[]{ "derp",2}); tp.Dump("We can use PopulateObjectMembers on Uninit"); typeof(SampleStruct).GetField("Str1").SetValue(tp,"lol"); tp.Dump("Works via SetValue too!"); typeof(SampleStruct).GetField("Str1").SetValue(to,"lol"); to.Dump("note that the consed one can't be changed, nothing up my sleeve."); } // Define other methods and classes here public struct SampleStruct { int _int1; public int Int1 {get{return _int1; }} public readonly string Str1; public SampleStruct(int int1, string str1) { _int1 = int1; Str1 = str1; } }