共用方式為


AbandonedMutexException 建構函式

定義

初始化 AbandonedMutexException 類別的新執行個體。

多載

名稱 Description
AbandonedMutexException()

使用預設值,初始化 AbandonedMutexException 類別的新實例。

AbandonedMutexException(String)

初始化類別的新實例 AbandonedMutexException 並指定錯誤訊息。

AbandonedMutexException(Int32, WaitHandle)

初始化一個類別的新實例 AbandonedMutexException ,並設定一個指定已放棄互斥組的索引(如適用)及 Mutex 代表該互斥組的物件。

AbandonedMutexException(SerializationInfo, StreamingContext)
已淘汰.

初始化一個新的類別實例 AbandonedMutexException ,並使用序列化資料。

AbandonedMutexException(String, Exception)

初始化一個新的類別實例 AbandonedMutexException ,並指定錯誤訊息及內部例外。

AbandonedMutexException(String, Int32, WaitHandle)

初始化類別的新實例 AbandonedMutexException ,包含指定的錯誤訊息、放棄互斥節的索引(如適用)及放棄互斥節。

AbandonedMutexException(String, Exception, Int32, WaitHandle)

初始化一個新的類別實例 AbandonedMutexException ,包含指定的錯誤訊息、內部例外、放棄互斥組織的索引(如適用)以及 Mutex 代表該互斥組織的物件。

AbandonedMutexException()

來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs

使用預設值,初始化 AbandonedMutexException 類別的新實例。

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

備註

此建構器會將 Message 新實例的屬性初始化為系統提供的訊息,描述錯誤,例如「因遺棄的互斥機構而完成的等待。」此訊息考量了當前系統文化。

下表顯示了 的 AbandonedMutexException初始屬性值。

房產 價值
InnerException null
Message 系統提供的錯誤訊息字串。
Mutex null
MutexIndex -1(減一)。

另請參閱

適用於

AbandonedMutexException(String)

來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs

初始化類別的新實例 AbandonedMutexException 並指定錯誤訊息。

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

參數

message
String

一個錯誤訊息,說明例外原因。

備註

內容 message 是為了讓人類理解。 此建構器的呼叫者必須確保此字串已在目前系統文化中本地化。

下表顯示了使用此建構子初始化的 AbandonedMutexException 實例的初始屬性值。

房產 價值
InnerException null
Message message
Mutex null
MutexIndex -1(減一)。

另請參閱

適用於

AbandonedMutexException(Int32, WaitHandle)

來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs

初始化一個類別的新實例 AbandonedMutexException ,並設定一個指定已放棄互斥組的索引(如適用)及 Mutex 代表該互斥組的物件。

public:
 AbandonedMutexException(int location, System::Threading::WaitHandle ^ handle);
public AbandonedMutexException(int location, System.Threading.WaitHandle handle);
public AbandonedMutexException(int location, System.Threading.WaitHandle? handle);
new System.Threading.AbandonedMutexException : int * System.Threading.WaitHandle -> System.Threading.AbandonedMutexException
Public Sub New (location As Integer, handle As WaitHandle)

參數

location
Int32

如果方法拋WaitAny出異常,則等待陣列中放棄的互斥式索引會處理;如果為 or WaitAll 方法拋出例外WaitOne,則 -1。

handle
WaitHandle

一個 Mutex 代表被遺棄互斥體的物件。

備註

此建構器會將 Message 新實例的屬性初始化為系統提供的訊息,描述錯誤,例如「因遺棄的互斥機構而完成的等待。」此訊息考量了當前系統文化。

下表顯示了使用此建構子初始化的 AbandonedMutexException 實例的初始屬性值。

房產 價值
InnerException null
Message 系統提供的錯誤訊息串。
Mutex handle
MutexIndex location

另請參閱

適用於

AbandonedMutexException(SerializationInfo, StreamingContext)

來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs

警告

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

初始化一個新的類別實例 AbandonedMutexException ,並使用序列化資料。

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

參數

info
SerializationInfo

存放 SerializationInfo 關於被拋出例外的序列化物件資料的物件。

context
StreamingContext

包含 StreamingContext 關於來源或目的地的上下文資訊的物件。

屬性

備註

此建構子在反序列化過程中被呼叫,以重建透過串流傳輸的例外物件。 欲了解更多資訊,請參閱 XML 與 SOAP 序列化

另請參閱

適用於

AbandonedMutexException(String, Exception)

來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs

初始化一個新的類別實例 AbandonedMutexException ,並指定錯誤訊息及內部例外。

public:
 AbandonedMutexException(System::String ^ message, Exception ^ inner);
public AbandonedMutexException(string message, Exception inner);
public AbandonedMutexException(string? message, Exception? inner);
new System.Threading.AbandonedMutexException : string * Exception -> System.Threading.AbandonedMutexException
Public Sub New (message As String, inner As Exception)

參數

message
String

一個錯誤訊息,說明例外原因。

inner
Exception

該例外即為當前例外的原因。 若 inner 參數不 null為 ,則在處理內部異常的區塊中提出 catch 當前例外。

備註

內容 message 是為了讓人類理解。 此建構器的呼叫者必須確保此字串已在目前系統文化中本地化。

因先前例外直接拋出的例外,應包含對該屬性中 InnerException 先前例外的參考。 該 InnerException 屬性回傳與傳入建構子相同的值,或 null 若該 InnerException 性質未提供內部例外值給建構子。

下表顯示了使用此建構子初始化的 AbandonedMutexException 實例的初始屬性值。

房產 價值
InnerException inner
Message message
Mutex null
MutexIndex -1(減一)。

另請參閱

適用於

AbandonedMutexException(String, Int32, WaitHandle)

來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs

初始化類別的新實例 AbandonedMutexException ,包含指定的錯誤訊息、放棄互斥節的索引(如適用)及放棄互斥節。

public:
 AbandonedMutexException(System::String ^ message, int location, System::Threading::WaitHandle ^ handle);
public AbandonedMutexException(string message, int location, System.Threading.WaitHandle handle);
public AbandonedMutexException(string? message, int location, System.Threading.WaitHandle? handle);
new System.Threading.AbandonedMutexException : string * int * System.Threading.WaitHandle -> System.Threading.AbandonedMutexException
Public Sub New (message As String, location As Integer, handle As WaitHandle)

參數

message
String

一個錯誤訊息,說明例外原因。

location
Int32

如果方法拋WaitAny出異常,則等待陣列中放棄的互斥式索引會處理;如果為 or WaitAll 方法拋出例外WaitOne,則 -1。

handle
WaitHandle

一個 Mutex 代表被遺棄互斥體的物件。

備註

內容 message 是為了讓人類理解。 此建構器的呼叫者必須確保此字串已在目前系統文化中本地化。

下表顯示了使用此建構子初始化的 AbandonedMutexException 實例的初始屬性值。

房產 價值
InnerException null
Message message
Mutex handle
MutexIndex location

另請參閱

適用於

AbandonedMutexException(String, Exception, Int32, WaitHandle)

來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs
來源:
AbandonedMutexException.cs

初始化一個新的類別實例 AbandonedMutexException ,包含指定的錯誤訊息、內部例外、放棄互斥組織的索引(如適用)以及 Mutex 代表該互斥組織的物件。

public:
 AbandonedMutexException(System::String ^ message, Exception ^ inner, int location, System::Threading::WaitHandle ^ handle);
public AbandonedMutexException(string message, Exception inner, int location, System.Threading.WaitHandle handle);
public AbandonedMutexException(string? message, Exception? inner, int location, System.Threading.WaitHandle? handle);
new System.Threading.AbandonedMutexException : string * Exception * int * System.Threading.WaitHandle -> System.Threading.AbandonedMutexException
Public Sub New (message As String, inner As Exception, location As Integer, handle As WaitHandle)

參數

message
String

一個錯誤訊息,說明例外原因。

inner
Exception

該例外即為當前例外的原因。 若 inner 參數不 null為 ,則在處理內部異常的區塊中提出 catch 當前例外。

location
Int32

如果方法拋WaitAny出異常,則等待陣列中放棄的互斥式索引會處理;如果為 or WaitAll 方法拋出例外WaitOne,則 -1。

handle
WaitHandle

一個 Mutex 代表被遺棄互斥體的物件。

備註

的內容 message 是一個文字串,用來通知使用者該例外。 此建構器的呼叫者必須確保此字串已在目前系統文化中本地化。

因先前例外直接拋出的例外,應包含對該屬性中 InnerException 先前例外的參考。 該 InnerException 屬性回傳與傳入建構子相同的值,或 null 若該 InnerException 性質未提供內部例外值給建構子。

下表顯示了使用此建構子初始化的 AbandonedMutexException 實例的初始屬性值。

房產 價值
InnerException inner
Message message
Mutex handle
MutexIndex location

另請參閱

適用於