JavaScriptTestEncoder.Encode 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Encode(String) |
編碼提供的字串,並將編碼後的文字以新字串形式回傳。 |
| Encode(TextWriter, Char[], Int32, Int32) |
從陣列中編碼字元並寫入 TextWriter 物件。 |
| Encode(TextWriter, String, Int32, Int32) |
編碼一個子字串並將其寫入物件 TextWriter 。 |
Encode(String)
編碼提供的字串,並將編碼後的文字以新字串形式回傳。
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)
從陣列中編碼字元並寫入 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)
編碼一個子字串並將其寫入物件 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
子字串中的字元數。