XmlWriter.WriteWhitespace(String) 方法
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当在派生类中被重写时,写出给定的空白区域。
public:
abstract void WriteWhitespace(System::String ^ ws);
C#
public abstract void WriteWhitespace (string ws);
C#
public abstract void WriteWhitespace (string? ws);
abstract member WriteWhitespace : string -> unit
Public MustOverride Sub WriteWhitespace (ws As String)
- ws
- String
空格字符的字符串。
字符串包含非空白字符。
在上一次异步操作完成之前调用了 XmlWriter 方法。 在此情况下,会引发 InvalidOperationException 并显示消息“异步操作已在进行中。”
此方法用于手动设置文档的格式。
有关此方法的异步版本,请参阅 WriteWhitespaceAsync。
产品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |