Encoder. Url Encode(Byte, Int32, Int32) Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Encodes an array of characters that are not allowed in a URL into a hexadecimal character-entity equivalent.
protected public: virtual cli::array <System::Byte> ^ UrlEncode(cli::array <System::Byte> ^ bytes, int offset, int count);
protected internal virtual byte UrlEncode (byte bytes, int offset, int count);
abstract member UrlEncode : byte * int * int -> byte override this.UrlEncode : byte * int * int -> byte
Protected Friend Overridable Function UrlEncode (bytes As Byte(), offset As Integer, count As Integer) As Byte()
An array of bytes to encode.
The position in the
bytes array at which to begin encoding.
The number of items in the
bytes array to encode.
An array of encoded characters.
offset is less than zero or greater than the length of the
count is less than zero or
offset is greater than the length of the
The UrlEncode method URL-encodes any character that is not in the set of ASCII characters that is considered to be URL-safe. Spaces are encoded as the ASCII "
+" character. URL-safe ASCII characters include the ASCII characters (A to Z and a to z), numerals (0 to 9), and some punctuation marks. The following table lists the punctuation marks that are considered URL-safe ASCII characters.