using System.Linq.Expressions;
using Detached.RuntimeTypes;
using static Detached.RuntimeTypes.Expressions.ExtendedExpression;
using static System.Linq.Expressions.Expression;
public static void Main()
Detached.RuntimeTypes.RuntimeTypeBuilder x;
RuntimeTypeBuilder typeBuilder = new RuntimeTypeBuilder("DefineAutoProperty");
typeBuilder.DefineAutoProperty("TestProp", typeof(int));
Type newType = typeBuilder.Create();
object newInstance = Activator.CreateInstance(newType);
PropertyInfo testPropInfo = newType.GetProperty("TestProp");
testPropInfo.SetValue(newInstance, 5);
int result = (int)testPropInfo.GetValue(newInstance);
Console.WriteLine(result);