110,535
社区成员
发帖
与我相关
我的任务
分享
newobj instance void [mscorlib]System.Guid::.ctor(string)
call instance void [mscorlib]System.Nullable`1<valuetype [mscorlib]System.Guid>::.ctor(!0)
Type propertyType = propertyInfo.PropertyType;
Type nullableUnderlyingType = Nullable.GetUnderlyingType(propertyType);
Type propertyBaseType = nullableUnderlyingType != null ? nullableUnderlyingType : propertyType;
il.Emit(OpCodes.Newobj, propertyBaseType.GetConstructor(new Type[] { typeof(string) }));
if (nullableUnderlyingType != null)
il.Emit(OpCodes.Call, propertyType.GetConstructor(Type.EmptyTypes));