private static void EmitConversion(CodeEmitter ilgen, Type converterType, string method) { CodeEmitterLocal converter = ilgen.UnsafeAllocTempLocal(converterType); ilgen.Emit(OpCodes.Ldloca, converter); ilgen.Emit(OpCodes.Call, converterType.GetMethod(method)); }