TargetException 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
TargetException 클래스의 새 인스턴스를 초기화합니다.
오버로드
| Name | Description |
|---|---|
| TargetException() |
빈 메시지와 예외의 TargetException 근본 원인을 사용하여 클래스의 새 인스턴스를 초기화합니다. |
| TargetException(String) |
지정된 메시지와 근본 원인 예외를 TargetException 사용하여 클래스의 새 인스턴스를 초기화합니다. |
| TargetException(SerializationInfo, StreamingContext) |
사용되지 않음.
지정된 serialization 및 컨텍스트 정보를 사용하여 클래스의 TargetException 새 인스턴스를 초기화합니다. |
| TargetException(String, Exception) |
지정된 오류 메시지와 이 예외의 TargetException 원인인 내부 예외에 대한 참조를 사용하여 클래스의 새 인스턴스를 초기화합니다. |
TargetException()
- Source:
- TargetException.cs
- Source:
- TargetException.cs
- Source:
- TargetException.cs
- Source:
- TargetException.cs
- Source:
- TargetException.cs
빈 메시지와 예외의 TargetException 근본 원인을 사용하여 클래스의 새 인스턴스를 초기화합니다.
public:
TargetException();
public TargetException();
Public Sub New ()
설명
속성이 InnerException 설정 null 되고 HRESULT 오류 코드가 COR_E_TARGET 설정됩니다.
TargetException 는 .에서 상속됩니다 Exception. 이 생성자는 다음 표와 같이 개체의 Exception 속성을 설정합니다.
| 재산 | 가치 |
|---|---|
| InnerException | null |
| Message | 빈 문자열("")입니다. |
적용 대상
TargetException(String)
- Source:
- TargetException.cs
- Source:
- TargetException.cs
- Source:
- TargetException.cs
- Source:
- TargetException.cs
- Source:
- TargetException.cs
지정된 메시지와 근본 원인 예외를 TargetException 사용하여 클래스의 새 인스턴스를 초기화합니다.
public:
TargetException(System::String ^ message);
public TargetException(string? message);
public TargetException(string message);
new System.Reflection.TargetException : string -> System.Reflection.TargetException
Public Sub New (message As String)
매개 변수
- message
- String
String 예외가 발생한 이유를 설명하는 것입니다.
설명
TargetException 는 .에서 상속됩니다 Exception. 이 생성자는 다음 표와 같이 개체의 Exception 속성을 설정합니다.
| 재산 | 가치 |
|---|---|
| InnerException | null |
| Message | 메시지 문자열입니다. |
적용 대상
TargetException(SerializationInfo, StreamingContext)
- Source:
- TargetException.cs
- Source:
- TargetException.cs
- Source:
- TargetException.cs
- Source:
- TargetException.cs
- Source:
- TargetException.cs
주의
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
지정된 serialization 및 컨텍스트 정보를 사용하여 클래스의 TargetException 새 인스턴스를 초기화합니다.
protected:
TargetException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected TargetException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected TargetException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Reflection.TargetException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Reflection.TargetException
new System.Reflection.TargetException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Reflection.TargetException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
매개 변수
- info
- SerializationInfo
개체를 직렬화하거나 역직렬화하기 위한 데이터입니다.
- context
- StreamingContext
개체의 원본 및 대상입니다.
- 특성
적용 대상
TargetException(String, Exception)
- Source:
- TargetException.cs
- Source:
- TargetException.cs
- Source:
- TargetException.cs
- Source:
- TargetException.cs
- Source:
- TargetException.cs
지정된 오류 메시지와 이 예외의 TargetException 원인인 내부 예외에 대한 참조를 사용하여 클래스의 새 인스턴스를 초기화합니다.
public:
TargetException(System::String ^ message, Exception ^ inner);
public TargetException(string? message, Exception? inner);
public TargetException(string message, Exception inner);
new System.Reflection.TargetException : string * Exception -> System.Reflection.TargetException
Public Sub New (message As String, inner As Exception)
매개 변수
- message
- String
예외의 이유를 설명하는 오류 메시지입니다.
- inner
- Exception
현재 예외의 원인인 예외입니다. 매개 변수가 inner 아닌 null경우 내부 예외를 catch 처리하는 블록에서 현재 예외가 발생합니다.
설명
이전 예외의 직접적인 결과로 throw되는 예외에는 속성의 이전 예외에 대한 참조가 InnerException 포함되어야 합니다. 속성 생성 InnerException 자에 전달 되는 동일한 값을 반환 하거나 null 속성 생성자에 내부 예외 값을 제공 하지 않는 경우 InnerException .
다음 표에서는 인스턴스 TargetException에 대한 초기 속성 값을 보여 줍니다.
| 재산 | 가치 |
|---|---|
| InnerException | 내부 예외 참조입니다. |
| Message | 오류 메시지 문자열입니다. |