SemaphoreFullException SemaphoreFullException SemaphoreFullException SemaphoreFullException Constructors

Definition

Overloads

SemaphoreFullException() SemaphoreFullException() SemaphoreFullException()

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

SemaphoreFullException(String) SemaphoreFullException(String) SemaphoreFullException(String) SemaphoreFullException(String)

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

SemaphoreFullException(SerializationInfo, StreamingContext) SemaphoreFullException(SerializationInfo, StreamingContext) SemaphoreFullException(SerializationInfo, StreamingContext) SemaphoreFullException(SerializationInfo, StreamingContext)

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

SemaphoreFullException(String, Exception) SemaphoreFullException(String, Exception) SemaphoreFullException(String, Exception) 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() SemaphoreFullException() SemaphoreFullException()

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

SemaphoreFullException(String) SemaphoreFullException(String) SemaphoreFullException(String) SemaphoreFullException(String)

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

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

Parameters

message
String String String 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

SemaphoreFullException(SerializationInfo, StreamingContext) SemaphoreFullException(SerializationInfo, StreamingContext) SemaphoreFullException(SerializationInfo, StreamingContext) SemaphoreFullException(SerializationInfo, StreamingContext)

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);
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 SerializationInfo SerializationInfo SerializationInfo

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

context
StreamingContext StreamingContext StreamingContext StreamingContext

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

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

SemaphoreFullException(String, Exception) SemaphoreFullException(String, Exception) SemaphoreFullException(String, Exception) 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.

public:
 SemaphoreFullException(System::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 String String String

The error message that explains the reason for the exception.

innerException
Exception Exception Exception 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