在我的应用程序中,我用来XAttribute.SetValue(...)
设置 xml 属性的值。该值由用户提供。
我有以下方法来设置属性值:
private void SetValue(XAttribute attribute, string input){ attribute.SetValue(input); }
如果输入为,Hello "World"
则属性的值为:Hello "World"
这正是我所期望的。
如果输入已经被“屏蔽”,Hello "World"
那么该属性的值为:Hello "World"
这是不正确的。
有没有办法避免这种转换?
POPMUISE
相关分类