MobileTextWriter.WriteUrlEncodedString(String, Boolean) 方法

定义

写入给定的字符串,并根据 URL 要求对它进行编码。Writes the given string, encoding it according to URL requirements.

protected:
 void WriteUrlEncodedString(System::String ^ s, bool argument);
protected void WriteUrlEncodedString (string s, bool argument);
member this.WriteUrlEncodedString : string * bool -> unit
Protected Sub WriteUrlEncodedString (s As String, argument As Boolean)

参数

s
String

要添加的字符串。The string to be added.

argument
Boolean

如果参数为 true,则将该字符串视为 URL 参数的一部分进行编码。If argument is true, the encoding is done as if the string were a part of the URL parameters. 如果参数为 false,则将该字符串视为 URL 路径部分的一部分进行编码。If argument is false, the encoding is done as if the string were part of the path portion of the URL.

注解

WriteEncodedUrl(String)WriteEncodedUrlParameter(String) 方法使用此方法作为实用工具方法。The WriteEncodedUrl(String) and WriteEncodedUrlParameter(String) methods use this method as a utility method.

适用于