JavaScriptTestEncoder.Encode 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| Encode(String) |
对提供的字符串进行编码,并将编码的文本作为新字符串返回。 |
| Encode(TextWriter, Char[], Int32, Int32) |
对数组中的字符进行编码,并将其写入对象 TextWriter 。 |
| Encode(TextWriter, String, Int32, Int32) |
对子字符串进行编码,并将其写入对象 TextWriter 。 |
Encode(String)
- Source:
- JavaScriptTestEncoder.cs
- Source:
- JavaScriptTestEncoder.cs
- Source:
- JavaScriptTestEncoder.cs
- Source:
- JavaScriptTestEncoder.cs
- Source:
- JavaScriptTestEncoder.cs
对提供的字符串进行编码,并将编码的文本作为新字符串返回。
public:
override System::String ^ Encode(System::String ^ value);
public override string Encode(string value);
override this.Encode : string -> string
Public Overrides Function Encode (value As String) As String
参数
- value
- String
要编码的字符串。
返回
编码的字符串。
适用于
Encode(TextWriter, Char[], Int32, Int32)
- Source:
- JavaScriptTestEncoder.cs
- Source:
- JavaScriptTestEncoder.cs
- Source:
- JavaScriptTestEncoder.cs
- Source:
- JavaScriptTestEncoder.cs
- Source:
- JavaScriptTestEncoder.cs
对数组中的字符进行编码,并将其写入对象 TextWriter 。
public:
override void Encode(System::IO::TextWriter ^ output, cli::array <char> ^ value, int startIndex, int characterCount);
public override void Encode(System.IO.TextWriter output, char[] value, int startIndex, int characterCount);
override this.Encode : System.IO.TextWriter * char[] * int * int -> unit
Public Overrides Sub Encode (output As TextWriter, value As Char(), startIndex As Integer, characterCount As Integer)
参数
- output
- TextWriter
要向其写入编码文本的流。
- value
- Char[]
要编码的字符数组。
- startIndex
- Int32
要编码的第一个字符的数组索引。
- characterCount
- Int32
要编码的数组中的字符数。
适用于
Encode(TextWriter, String, Int32, Int32)
- Source:
- JavaScriptTestEncoder.cs
- Source:
- JavaScriptTestEncoder.cs
- Source:
- JavaScriptTestEncoder.cs
- Source:
- JavaScriptTestEncoder.cs
- Source:
- JavaScriptTestEncoder.cs
对子字符串进行编码,并将其写入对象 TextWriter 。
public:
override void Encode(System::IO::TextWriter ^ output, System::String ^ value, int startIndex, int characterCount);
public override void Encode(System.IO.TextWriter output, string value, int startIndex, int characterCount);
override this.Encode : System.IO.TextWriter * string * int * int -> unit
Public Overrides Sub Encode (output As TextWriter, value As String, startIndex As Integer, characterCount As Integer)
参数
- output
- TextWriter
要向其写入编码文本的流。
- value
- String
要对其子字符串进行编码的字符串。
- startIndex
- Int32
子字符串开始的索引。
- characterCount
- Int32
子字符串中的字符数。