다음을 통해 공유


IOException 생성자

정의

메시지 문자열을 사용하여 클래스의 IOException 새 인스턴스를 초기화합니다.

오버로드

Name Description
IOException()

메시지 문자열이 빈 문자열(""), HRESULT가 COR_E_IO 설정되고 내부 예외가 null 참조로 설정된 클래스의 새 인스턴스 IOException 를 초기화합니다.

IOException(String)

메시지 문자열이 설정된 클래스의 IOException 새 인스턴스를 초기화하고, HRESULT를 COR_E_IO 설정하고, 내부 예외를 설정하여 클래스의 새 인스턴스를 초기화합니다null.message

IOException(SerializationInfo, StreamingContext)
사용되지 않음.

지정된 serialization 및 컨텍스트 정보를 사용하여 클래스의 IOException 새 인스턴스를 초기화합니다.

IOException(String, Exception)

지정된 오류 메시지와 이 예외의 IOException 원인인 내부 예외에 대한 참조를 사용하여 클래스의 새 인스턴스를 초기화합니다.

IOException(String, Int32)

메시지 문자열이 설정된 message 클래스의 IOException 새 인스턴스와 해당 HRESULT 사용자 정의 인스턴스를 초기화합니다.

IOException()

Source:
IOException.cs
Source:
IOException.cs
Source:
IOException.cs
Source:
IOException.cs
Source:
IOException.cs

메시지 문자열이 빈 문자열(""), HRESULT가 COR_E_IO 설정되고 내부 예외가 null 참조로 설정된 클래스의 새 인스턴스 IOException 를 초기화합니다.

public:
 IOException();
public IOException();
Public Sub New ()

설명

생성자는 "요청된 작업을 수행하는 동안 I/O 오류가 발생했습니다."와 같은 오류를 설명하는 시스템 제공 메시지로 새 인스턴스의 속성을 초기화 Message 합니다. 이 메시지는 현재 시스템 문화권을 고려합니다.

추가 정보

적용 대상

IOException(String)

Source:
IOException.cs
Source:
IOException.cs
Source:
IOException.cs
Source:
IOException.cs
Source:
IOException.cs

메시지 문자열이 설정된 클래스의 IOException 새 인스턴스를 초기화하고, HRESULT를 COR_E_IO 설정하고, 내부 예외를 설정하여 클래스의 새 인스턴스를 초기화합니다null.message

public:
 IOException(System::String ^ message);
public IOException(string message);
public IOException(string? message);
new System.IO.IOException : string -> System.IO.IOException
Public Sub New (message As String)

매개 변수

message
String

오류를 설명하는 A String 입니다. 콘텐츠 message 는 인간이 이해할 수 있도록 고안되었습니다. 이 문자열이 현재 시스템 문화권에 맞게 지역화되었는지 확인하려면 이 생성자의 호출자가 필요합니다.

설명

생성자는 .를 Message 사용하여 message새 인스턴스의 속성을 초기화합니다.

추가 정보

적용 대상

IOException(SerializationInfo, StreamingContext)

Source:
IOException.cs
Source:
IOException.cs
Source:
IOException.cs
Source:
IOException.cs
Source:
IOException.cs

주의

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

지정된 serialization 및 컨텍스트 정보를 사용하여 클래스의 IOException 새 인스턴스를 초기화합니다.

protected:
 IOException(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 IOException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected IOException(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.IO.IOException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.IO.IOException
new System.IO.IOException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.IO.IOException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

매개 변수

info
SerializationInfo

개체를 직렬화하거나 역직렬화하기 위한 데이터입니다.

context
StreamingContext

개체의 원본 및 대상입니다.

특성

추가 정보

적용 대상

IOException(String, Exception)

Source:
IOException.cs
Source:
IOException.cs
Source:
IOException.cs
Source:
IOException.cs
Source:
IOException.cs

지정된 오류 메시지와 이 예외의 IOException 원인인 내부 예외에 대한 참조를 사용하여 클래스의 새 인스턴스를 초기화합니다.

public:
 IOException(System::String ^ message, Exception ^ innerException);
public IOException(string message, Exception innerException);
public IOException(string? message, Exception? innerException);
new System.IO.IOException : string * Exception -> System.IO.IOException
Public Sub New (message As String, innerException As Exception)

매개 변수

message
String

예외의 이유를 설명하는 오류 메시지입니다.

innerException
Exception

현재 예외의 원인인 예외입니다. 매개 변수가 innerException 아닌 null경우 내부 예외를 catch 처리하는 블록에서 현재 예외가 발생합니다.

설명

이전 예외의 직접적인 결과로 throw되는 예외에는 속성의 이전 예외에 대한 참조가 InnerException 포함되어야 합니다. 속성 생성 InnerException 자에 전달 되는 동일한 값을 반환 하거나 null 속성 생성자에 내부 예외 값을 제공 하지 않는 경우 InnerException .

다음 표에서는 인스턴스 IOException에 대한 초기 속성 값을 보여 줍니다.

재산 가치
InnerException 내부 예외 참조입니다.
Message 오류 메시지 문자열입니다.

내부 예외에 대한 자세한 내용은 다음을 참조하세요 InnerException.

추가 정보

적용 대상

IOException(String, Int32)

Source:
IOException.cs
Source:
IOException.cs
Source:
IOException.cs
Source:
IOException.cs
Source:
IOException.cs

메시지 문자열이 설정된 message 클래스의 IOException 새 인스턴스와 해당 HRESULT 사용자 정의 인스턴스를 초기화합니다.

public:
 IOException(System::String ^ message, int hresult);
public IOException(string message, int hresult);
public IOException(string? message, int hresult);
new System.IO.IOException : string * int -> System.IO.IOException
Public Sub New (message As String, hresult As Integer)

매개 변수

message
String

오류를 설명하는 A String 입니다. 콘텐츠 message 는 인간이 이해할 수 있도록 고안되었습니다. 이 문자열이 현재 시스템 문화권에 맞게 지역화되었는지 확인하려면 이 생성자의 호출자가 필요합니다.

hresult
Int32

발생한 오류를 식별하는 정수입니다.

추가 정보

적용 대상