我有以下setter方法,但是我放入value的对象没有通过被调用的方法:

.method public hidebysig specialname instance void set_SeatingCapacity(int32 'value') cil managed
{
    .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor()
    .maxstack 3
    L_0000: ldc.i4 0x6c
    L_0005: ldarg.0 
    L_0006: ldfld int32 Young3.FMSearch.Core.Entities.InGame.BaseObject::MemoryAddress
    L_000b: ldarg.1 
    L_000c: call void Young3.FMSearch.Core.Managers.PropertyInvoker::Set(int32, int32, object)
    L_0011: ret 
}

我想在L_000c中调用该函数,如Set(0x6c, ldfld MemoryAddress, value)。前两个字段正确发布到该函数。任何线索?在做类似的事情并查看Reflector中的定义时看起来很顺利。

有帮助吗?

解决方案

我必须做box int32,或者Set进入Set<T>

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top