DriveNotFoundException Oluşturucular

Tanım

DriveNotFoundException sınıfının yeni bir örneğini başlatır.

Aşırı Yüklemeler

DriveNotFoundException()

İleti dizesi sistem tarafından sağlanan bir iletiye, HRESULT'ı da COR_E_DIRECTORYNOTFOUND olarak ayarlanmış şekilde sınıfın yeni bir örneğini DriveNotFoundException başlatır.

DriveNotFoundException(String)

Belirtilen ileti dizesiyle sınıfının yeni bir örneğini DriveNotFoundException başlatır ve HRESULT COR_E_DIRECTORYNOTFOUND olarak ayarlanır.

DriveNotFoundException(SerializationInfo, StreamingContext)
Geçersiz.

Belirtilen serileştirme ve bağlam bilgileriyle sınıfının yeni bir örneğini DriveNotFoundException başlatır.

DriveNotFoundException(String, Exception)

Belirtilen hata iletisi ve bu özel durumun nedeni olan iç özel duruma başvuru ile sınıfının yeni bir örneğini DriveNotFoundException başlatır.

DriveNotFoundException()

Kaynak:
DriveNotFoundException.cs
Kaynak:
DriveNotFoundException.cs
Kaynak:
DriveNotFoundException.cs

İleti dizesi sistem tarafından sağlanan bir iletiye, HRESULT'ı da COR_E_DIRECTORYNOTFOUND olarak ayarlanmış şekilde sınıfın yeni bir örneğini DriveNotFoundException başlatır.

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

Açıklamalar

Bu oluşturucu, yeni örneğin özelliğini sistem tarafından sağlanan ve "Belirtilen dizin bulunamadı" gibi hatayı açıklayan bir iletiye başlatır Exception.Message . Bu ileti, geçerli sistem kültürüne göre yerelleştirilir.

Exception.InnerException Yeni örneğin özelliği olarak nullbaşlatılır.

Ayrıca bkz.

Şunlara uygulanır

DriveNotFoundException(String)

Kaynak:
DriveNotFoundException.cs
Kaynak:
DriveNotFoundException.cs
Kaynak:
DriveNotFoundException.cs

Belirtilen ileti dizesiyle sınıfının yeni bir örneğini DriveNotFoundException başlatır ve HRESULT COR_E_DIRECTORYNOTFOUND olarak ayarlanır.

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

Parametreler

message
String

Hatayı String açıklayan bir nesne. Bu yapıcının çağırıcısı, bu dizenin geçerli sistem kültürü için yerelleştirilmiş olduğundan emin olmak için gereklidir.

Açıklamalar

Bu oluşturucu, parametresini Exception.Message kullanarak message yeni örneğin özelliğini başlatır.

Exception.InnerException Yeni örneğin özelliği olarak nullbaşlatılır.

Ayrıca bkz.

Şunlara uygulanır

DriveNotFoundException(SerializationInfo, StreamingContext)

Kaynak:
DriveNotFoundException.cs
Kaynak:
DriveNotFoundException.cs
Kaynak:
DriveNotFoundException.cs

Dikkat

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

Belirtilen serileştirme ve bağlam bilgileriyle sınıfının yeni bir örneğini DriveNotFoundException başlatır.

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

Parametreler

info
SerializationInfo

SerializationInfo Oluşan özel durumla ilgili serileştirilmiş nesne verilerini içeren bir nesne.

context
StreamingContext

StreamingContext Oluşan özel durumun kaynağı veya hedefi hakkında bağlamsal bilgiler içeren bir nesne.

Öznitelikler

Ayrıca bkz.

Şunlara uygulanır

DriveNotFoundException(String, Exception)

Kaynak:
DriveNotFoundException.cs
Kaynak:
DriveNotFoundException.cs
Kaynak:
DriveNotFoundException.cs

Belirtilen hata iletisi ve bu özel durumun nedeni olan iç özel duruma başvuru ile sınıfının yeni bir örneğini DriveNotFoundException başlatır.

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

Parametreler

message
String

Özel durumun nedenini açıklayan hata iletisi.

innerException
Exception

Geçerli özel durumun nedeni olan özel durum. innerException parametresi değilsenull, geçerli özel durum iç özel durumu işleyen bir catch blokta oluşturulur.

Açıklamalar

Bir önceki özel durumun doğrudan bir sonucu olarak oluşturulan bir özel durum, InnerException özelliğindeki önceki özel duruma başvuru içermelidir. InnerException özelliği, oluşturucuya iletilen aynı değeri ya da InnerException özelliği oluşturucuya iç özel durum değeri sağlamıyorsa null değerini döndürür.

Aşağıdaki tablo, DirectoryNotFoundException öğesinin bir örneği için başlangıç özellik değerlerini gösterir.

Özellik Değer
InnerException İç özel duruma başvuru.
Message Hata iletisi dizesi.

Ayrıca bkz.

Şunlara uygulanır