UrlTestEncoder.Encode Method

Definition

Overloads

Encode(String)

Encodes the supplied string and returns the encoded text as a new string.

Encode(TextWriter, Char[], Int32, Int32)

Encodes characters from an array and writes them to a TextWriter object.

Encode(TextWriter, String, Int32, Int32)

Encodes a substring and writes it to a TextWriter object.

Encode(String)

Source:
UrlTestEncoder.cs
Source:
UrlTestEncoder.cs

Encodes the supplied string and returns the encoded text as a new string.

public override string Encode (string value);

Parameters

value
String

The string to encode.

Returns

The encoded string.

Applies to

.NET 9 (package-provided) 及其他版本
產品 版本
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)

Encode(TextWriter, Char[], Int32, Int32)

Source:
UrlTestEncoder.cs
Source:
UrlTestEncoder.cs

Encodes characters from an array and writes them to a TextWriter object.

public override void Encode (System.IO.TextWriter output, char[] value, int startIndex, int characterCount);

Parameters

output
TextWriter

The stream to which to write the encoded text.

value
Char[]

The array of characters to encode.

startIndex
Int32

The array index of the first character to encode.

characterCount
Int32

The number of characters in the array to encode.

Applies to

.NET 9 (package-provided) 及其他版本
產品 版本
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)

Encode(TextWriter, String, Int32, Int32)

Source:
UrlTestEncoder.cs
Source:
UrlTestEncoder.cs

Encodes a substring and writes it to a TextWriter object.

public override void Encode (System.IO.TextWriter output, string value, int startIndex, int characterCount);

Parameters

output
TextWriter

The stream to which to write the encoded text.

value
String

The string whose substring is to be encoded.

startIndex
Int32

The index where the substring starts.

characterCount
Int32

The number of characters in the substring.

Applies to

.NET 9 (package-provided) 及其他版本
產品 版本
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)