संपादित करें

इसके माध्यम से साझा किया गया


SemaphoreFullException Constructors

Definition

Initializes a new instance of the SemaphoreFullException class.

Overloads

SemaphoreFullException()

Initializes a new instance of the SemaphoreFullException class with default values.

SemaphoreFullException(String)

Initializes a new instance of the SemaphoreFullException class with a specified error message.

SemaphoreFullException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the SemaphoreFullException class with serialized data.

SemaphoreFullException(String, Exception)

Initializes a new instance of the SemaphoreFullException class with a specified error message and a reference to the inner exception that is the cause of this exception.

SemaphoreFullException()

Source:
SemaphoreFullException.cs
Source:
SemaphoreFullException.cs
Source:
SemaphoreFullException.cs

Initializes a new instance of the SemaphoreFullException class with default values.

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

Remarks

This constructor initializes the Message property of the new instance to a system-supplied message that describes the error, such as "Adding the given count to the semaphore would cause it to exceed its maximum count." This message takes into account the current system culture.

The following table shows the initial property values for an instance of the SemaphoreFullException class.

Property Value
InnerException null.
Message The system-supplied error message string.

See also

Applies to

SemaphoreFullException(String)

Source:
SemaphoreFullException.cs
Source:
SemaphoreFullException.cs
Source:
SemaphoreFullException.cs

Initializes a new instance of the SemaphoreFullException class with a specified error message.

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

Parameters

message
String

The error message that explains the reason for the exception.

Remarks

The content of message is a text string intended to inform the user about the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

The following table shows the initial property values for an instance of the SemaphoreFullException class initialized with this constructor.

Property Value
InnerException null.
Message message.

See also

Applies to

SemaphoreFullException(SerializationInfo, StreamingContext)

Source:
SemaphoreFullException.cs
Source:
SemaphoreFullException.cs
Source:
SemaphoreFullException.cs

Caution

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

Initializes a new instance of the SemaphoreFullException class with serialized data.

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

Parameters

info
SerializationInfo

The SerializationInfo object that holds the serialized object data about the exception being thrown.

context
StreamingContext

The StreamingContext object that contains contextual information about the source or destination.

Attributes

Remarks

This constructor is called during deserialization to reconstitute the exception object transmitted over a stream. For more information, see XML and SOAP Serialization.

See also

Applies to

SemaphoreFullException(String, Exception)

Source:
SemaphoreFullException.cs
Source:
SemaphoreFullException.cs
Source:
SemaphoreFullException.cs

Initializes a new instance of the SemaphoreFullException class with a specified error message and a reference to the inner exception that is the cause of this exception.

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

Parameters

message
String

The error message that explains the reason for the exception.

innerException
Exception

The exception that is the cause of the current exception. If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

Remarks

An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

See also

Applies to