我可以阻止PropertyInfo.SetValue删除前导换行符吗?

时间:2018-05-30 03:23:25

标签: c# reflection

PropertyInfo propertyInfo = myObjectType.GetProperty(propName);
propertyInfo.SetValue(myObject, "\n some text", null);

结果是myObject.propName =“some text”

感谢

0 个答案:

没有答案