HttpEncoder.UrlEncode(Byte[], Int32, Int32) 메서드

정의

URL에서 허용되지 않는 문자 배열을 해당하는 16진수 문자 엔터티로 인코딩합니다.

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()

매개 변수

bytes
Byte[]

인코딩할 바이트 배열입니다.

offset
Int32

인코딩을 bytes 시작할 배열의 위치입니다.

count
Int32

인코딩할 배열의 bytes 항목 수입니다.

반품

Byte[]

인코딩된 문자의 배열입니다.

예외

offset 가 0보다 작거나 배열의 길이보다 큽니다 bytes .

-또는-

count 가 0보다 작거나 count 더하기 offset 가 배열의 bytes 길이보다 큽니다.

bytesnull입니다.

설명

UrlEncode 메서드는 클래스의 여러 URL 인코딩 메서드에 의해 호출됩니다 HttpUtility .

이 메서드는 UrlEncode URL로부터 안전한 것으로 간주되는 ASCII 문자 집합에 없는 문자를 URL로 인코딩합니다. 공백은 ASCII "+" 문자로 인코딩됩니다. URL로부터 안전한 ASCII 문자에는 ASCII 문자(A-Z 및 a to z), 숫자(0~9) 및 일부 문장 부호가 포함됩니다. 다음 표에서는 URL로부터 안전한 ASCII 문자로 간주되는 문장 부호를 나열합니다.

캐릭터 Description
- 하이픈
_ 밑줄
. 마침표(점)
! 느낌표
* 별표(별표)
( 괄호
) 닫는 괄호

적용 대상