Win32Exception Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy Win32Exception.

Przeciążenia

Win32Exception()

Inicjuje Win32Exception nowe wystąpienie klasy z ostatnim błędem Win32, który wystąpił.

Win32Exception(Int32)

Inicjuje Win32Exception nowe wystąpienie klasy z określonym błędem.

Win32Exception(String)

Inicjuje Win32Exception nowe wystąpienie klasy z określonym szczegółowym opisem.

Win32Exception(Int32, String)

Inicjuje Win32Exception nowe wystąpienie klasy z określonym błędem i określonym szczegółowym opisem.

Win32Exception(SerializationInfo, StreamingContext)
Przestarzałe.

Inicjuje nowe wystąpienie Win32Exception klasy z określonym kontekstem i informacjami o serializacji.

Win32Exception(String, Exception)

Inicjuje nowe wystąpienie Win32Exception klasy z określonym szczegółowym opisem i określonym wyjątkiem.

Win32Exception()

Inicjuje Win32Exception nowe wystąpienie klasy z ostatnim błędem Win32, który wystąpił.

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

Uwagi

Szczegółowy opis błędu zostanie określony przez komunikat o błędzie Win32 skojarzony z błędem.

Ten konstruktor używa GetLastWin32Error metody Marshal w celu pobrania kodu błędu.

Dotyczy

Win32Exception(Int32)

Inicjuje Win32Exception nowe wystąpienie klasy z określonym błędem.

public:
 Win32Exception(int error);
public Win32Exception (int error);
new System.ComponentModel.Win32Exception : int -> System.ComponentModel.Win32Exception
Public Sub New (error As Integer)

Parametry

error
Int32

Kod błędu Win32 skojarzony z tym wyjątkiem.

Uwagi

Szczegółowy opis błędu jest określany przez komunikat o błędzie Win32 skojarzony z błędem.

Dotyczy

Win32Exception(String)

Inicjuje Win32Exception nowe wystąpienie klasy z określonym szczegółowym opisem.

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

Parametry

message
String

Szczegółowy opis błędu.

Dotyczy

Win32Exception(Int32, String)

Inicjuje Win32Exception nowe wystąpienie klasy z określonym błędem i określonym szczegółowym opisem.

public:
 Win32Exception(int error, System::String ^ message);
public Win32Exception (int error, string message);
public Win32Exception (int error, string? message);
new System.ComponentModel.Win32Exception : int * string -> System.ComponentModel.Win32Exception
Public Sub New (error As Integer, message As String)

Parametry

error
Int32

Kod błędu Win32 skojarzony z tym wyjątkiem.

message
String

Szczegółowy opis błędu.

Uwagi

Szczegółowy opis błędu jest określany przez komunikat o błędzie Win32 skojarzony z błędem.

Dotyczy

Win32Exception(SerializationInfo, StreamingContext)

Przestroga

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

Inicjuje nowe wystąpienie Win32Exception klasy z określonym kontekstem i informacjami o serializacji.

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

Parametry

info
SerializationInfo

Skojarzony SerializationInfo z tym wyjątkiem.

context
StreamingContext

Element StreamingContext reprezentujący kontekst tego wyjątku.

Atrybuty

Dotyczy

Win32Exception(String, Exception)

Inicjuje nowe wystąpienie Win32Exception klasy z określonym szczegółowym opisem i określonym wyjątkiem.

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

Parametry

message
String

Szczegółowy opis błędu.

innerException
Exception

Odwołanie do wyjątku wewnętrznego, który jest przyczyną tego wyjątku.

Dotyczy