protected virtual void EmitStind(Type type)
{
if (type == typeof(bool) ||
type == typeof(int)) {
ilGenerator.Emit(OpCodes.Stind_I4);
} else if (type == typeof(char)) {
ilGenerator.Emit(OpCodes.Stind_I2);
}
else {
ilGenerator.Emit(OpCodes.Stind_Ref);
}
}