CustomErrorCollection.Get 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 CustomError을 가져옵니다.
오버로드
| Name | Description |
|---|---|
| Get(String) |
CustomError 지정된 상태 코드가 있는 개체를 가져옵니다. |
| Get(Int32) |
지정된 인덱스가 CustomError 있는 개체를 가져옵니다. |
Get(String)
CustomError 지정된 상태 코드가 있는 개체를 가져옵니다.
public:
System::Web::Configuration::CustomError ^ Get(System::String ^ statusCode);
public System.Web.Configuration.CustomError Get(string statusCode);
member this.Get : string -> System.Web.Configuration.CustomError
Public Function Get (statusCode As String) As CustomError
매개 변수
- statusCode
- String
사용자 지정 오류와 연결된 HTTP 상태 코드입니다.
반품
CustomError 지정된 상태 코드가 있는 개체입니다.
예제
다음 코드 예제에서는 지정된 상태 코드를 사용하여 개체를 CustomError 가져오는 방법을 보여 줍니다.
컬렉션을 가져오는 방법을 알아보려면 클래스 항목의 CustomErrorCollection 코드 예제를 참조하세요.
// Get the error with status code 404.
CustomError customError1 =
customErrorsCollection["404"];
' Get the error with status code 404.
Dim customError1 As CustomError = _
customErrorsCollection("404")
적용 대상
Get(Int32)
지정된 인덱스가 CustomError 있는 개체를 가져옵니다.
public:
System::Web::Configuration::CustomError ^ Get(int index);
public System.Web.Configuration.CustomError Get(int index);
member this.Get : int -> System.Web.Configuration.CustomError
Public Function Get (index As Integer) As CustomError
매개 변수
- index
- Int32
개체의 컬렉션 인덱스 CustomError 입니다.
반품
CustomError 지정된 인덱스가 있는 인덱스입니다.
예제
다음 코드 예제에서는 지정된 컬렉션 인덱스에서 개체를 CustomError 가져오는 방법을 보여 있습니다.
컬렉션을 가져오는 방법을 알아보려면 클래스 항목의 CustomErrorCollection 코드 예제를 참조하세요.
// Get the error with collection index 0.
CustomError customError =
customErrorsCollection[0];
' Get the error with collection index 0.
Dim customError As CustomError = _
customErrorsCollection(0)