XmlTextWriter.QuoteChar 属性

定义

获取或设置要用于引用属性值的字符。Gets or sets which character to use to quote attribute values.

public:
 property char QuoteChar { char get(); void set(char value); };
public char QuoteChar { get; set; }
member this.QuoteChar : char with get, set
Public Property QuoteChar As Char

属性值

Char

用于引用属性值的字符。The character to use to quote attribute values. 这必须是单引号 (& #39; ) 或双引号 (& #34; ) 。This must be a single quote (') or a double quote ("). 默认为双引号。The default is a double quote.

例外

将该属性设置为非单引号,也非双引号。Setting this property to something other than either a single or double quote.

注解

备注

从 .NET Framework 2.0 开始,我们建议 XmlWriter 使用 XmlWriter.Create 方法和类创建实例, XmlWriterSettings 以利用新功能。Starting with the .NET Framework 2.0, we recommend that you create XmlWriter instances by using the XmlWriter.Create method and the XmlWriterSettings class to take advantage of new functionality.

适用于