Share via


PrincipalExistsException 建構函式

定義

執行個體化 PrincipalExistsException 類別的新執行個體。

多載

PrincipalExistsException()

執行個體化 PrincipalExistsException 類別的新執行個體。

PrincipalExistsException(String)

使用指定的錯誤訊息,初始化 PrincipalExistsException 類別的新執行個體。

PrincipalExistsException(SerializationInfo, StreamingContext)
已淘汰.

從指定的 PrincipalExistsExceptionSerializationInfo 執行個體,初始化 StreamingContext 類別的新執行個體。

PrincipalExistsException(String, Exception)

使用指定的錯誤訊息和指定的巢狀例外狀況,具現化 PrincipalExistsException 類別的新執行個體。

PrincipalExistsException()

來源:
exceptions.cs
來源:
exceptions.cs
來源:
exceptions.cs

執行個體化 PrincipalExistsException 類別的新執行個體。

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

備註

無參數建構函式會初始化 類別的新實例 PrincipalExistsException 。 屬性 Message 會初始化為描述錯誤的系統提供訊息。 此訊息會考慮到目前系統的文化特性。 InnerException 屬性會初始化為 null

適用於

PrincipalExistsException(String)

來源:
exceptions.cs
來源:
exceptions.cs
來源:
exceptions.cs

使用指定的錯誤訊息,初始化 PrincipalExistsException 類別的新執行個體。

public:
 PrincipalExistsException(System::String ^ message);
public PrincipalExistsException (string message);
new System.DirectoryServices.AccountManagement.PrincipalExistsException : string -> System.DirectoryServices.AccountManagement.PrincipalExistsException
Public Sub New (message As String)

參數

message
String

錯誤訊息的文字。

備註

實例會初始化,Message並將 PrincipalExistsException 屬性設定為的值message。 如果 為 messagenull,則 Message 屬性會初始化為系統提供的訊息。

適用於

PrincipalExistsException(SerializationInfo, StreamingContext)

來源:
exceptions.cs
來源:
exceptions.cs
來源:
exceptions.cs

警告

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

從指定的 PrincipalExistsExceptionSerializationInfo 執行個體,初始化 StreamingContext 類別的新執行個體。

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

參數

info
SerializationInfo

SerializationInfo,包含序列化新 PrincipalExistsException 所需的資訊。

context
StreamingContext

StreamingContext,包含與新 PrincipalExistsException 關聯之序列化資料流的來源。

屬性

適用於

PrincipalExistsException(String, Exception)

來源:
exceptions.cs
來源:
exceptions.cs
來源:
exceptions.cs

使用指定的錯誤訊息和指定的巢狀例外狀況,具現化 PrincipalExistsException 類別的新執行個體。

public:
 PrincipalExistsException(System::String ^ message, Exception ^ innerException);
public PrincipalExistsException (string message, Exception innerException);
new System.DirectoryServices.AccountManagement.PrincipalExistsException : string * Exception -> System.DirectoryServices.AccountManagement.PrincipalExistsException
Public Sub New (message As String, innerException As Exception)

參數

message
String

錯誤訊息的文字。

innerException
Exception

巢狀例外狀況。

備註

實例會初始化,並將 PrincipalExistsException 屬性設定為的值messageInnerException並將屬性設定為的值innerExceptionMessage 如果 為 messagenull,則 Message 屬性會初始化為系統提供的訊息。 初始化 InnerExceptionnull

適用於