【发布时间】:2016-04-15 13:34:15
【问题描述】:
正如标题所说。我正在使用 C#.Net Framework 4.5 的同事可以很好地设置属性,但在 VB.Net 4.0 中我得到:
“'DoNotEscapeUriAttributes' 不是 'System.Xml.XmlWriterSettings' 的成员”。
MSDN 说这应该是“自 2.0 起可用”,并在 VB 下列出,据我所知,它应该在那里吗? https://msdn.microsoft.com/en-us/library/system.xml.xmlwritersettings.donotescapeuriattributes(v=vs.110).aspx
我正在使用的代码:
Dim XMLSettings As XmlWriterSettings = New XmlWriterSettings With
{
.Indent = False,
.DoNotEscapeUriAttributes = True,
.NewLineHandling = NewLineHandling.None,
.OmitXmlDeclaration = True
}
【问题讨论】: