SocketException Konstruktorer
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Initierar en ny instans av SocketException klassen.
Överlagringar
| Name | Description |
|---|---|
| SocketException() |
Initierar en ny instans av SocketException klassen med den senaste felkoden för operativsystemet. |
| SocketException(Int32) |
Initierar en ny instans av SocketException klassen med den angivna felkoden. |
| SocketException(Int32, String) |
Initierar en ny instans av SocketException klassen med den angivna felkoden och meddelandet. |
| SocketException(SerializationInfo, StreamingContext) |
Föråldrad.
Initierar en ny instans av SocketException klassen från de angivna instanserna av SerializationInfo klasserna och StreamingContext . |
SocketException()
- Källa:
- SocketException.Unix.cs
- Källa:
- SocketException.Unix.cs
- Källa:
- SocketException.Unix.cs
- Källa:
- SocketException.Unix.cs
- Källa:
- SocketException.Unix.cs
Initierar en ny instans av SocketException klassen med den senaste felkoden för operativsystemet.
public:
SocketException();
public SocketException();
Public Sub New ()
Kommentarer
Konstruktorn SocketException anger ErrorCode egenskapen till det senaste operativsystemets socketfel som inträffade. Mer information om socketfelkoder finns i dokumentationen Windows Sockets version 2 API.
Gäller för
SocketException(Int32)
- Källa:
- SocketException.cs
- Källa:
- SocketException.cs
- Källa:
- SocketException.cs
- Källa:
- SocketException.cs
- Källa:
- SocketException.cs
Initierar en ny instans av SocketException klassen med den angivna felkoden.
public:
SocketException(int errorCode);
public SocketException(int errorCode);
new System.Net.Sockets.SocketException : int -> System.Net.Sockets.SocketException
Public Sub New (errorCode As Integer)
Parametrar
- errorCode
- Int32
Felkoden som anger felet som inträffade.
Kommentarer
Konstruktorn SocketException anger ErrorCode egenskapen till errorCode.
Gäller för
SocketException(Int32, String)
- Källa:
- SocketException.cs
- Källa:
- SocketException.cs
- Källa:
- SocketException.cs
- Källa:
- SocketException.cs
Initierar en ny instans av SocketException klassen med den angivna felkoden och meddelandet.
public:
SocketException(int errorCode, System::String ^ message);
public SocketException(int errorCode, string? message);
new System.Net.Sockets.SocketException : int * string -> System.Net.Sockets.SocketException
Public Sub New (errorCode As Integer, message As String)
Parametrar
- errorCode
- Int32
Felkoden som anger felet som inträffade.
- message
- String
Meddelandet som beskriver felet.
Gäller för
SocketException(SerializationInfo, StreamingContext)
- Källa:
- SocketException.cs
- Källa:
- SocketException.cs
- Källa:
- SocketException.cs
- Källa:
- SocketException.cs
- Källa:
- SocketException.cs
Varning
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
Initierar en ny instans av SocketException klassen från de angivna instanserna av SerializationInfo klasserna och StreamingContext .
protected:
SocketException(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
[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 SocketException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
protected SocketException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
[<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.Net.Sockets.SocketException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.Sockets.SocketException
new System.Net.Sockets.SocketException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.Sockets.SocketException
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)
Parametrar
- serializationInfo
- SerializationInfo
En SerializationInfo instans som innehåller den information som krävs för att serialisera den nya SocketException instansen.
- streamingContext
- StreamingContext
En StreamingContext som innehåller källan till den serialiserade dataström som är associerad med den nya SocketException instansen.
- Attribut
Kommentarer
Den här konstruktorn implementerar ISerializable gränssnittet för SocketException klassen.