CountdownEvent.TryAddCount Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Tente d’incrémenter CurrentCount.
Surcharges
| Nom | Description |
|---|---|
| TryAddCount() |
Tente d’incrémenter CurrentCount d’un. |
| TryAddCount(Int32) |
Tente d’incrémenter CurrentCount par une valeur spécifiée. |
TryAddCount()
Tente d’incrémenter CurrentCount d’un.
public:
bool TryAddCount();
public bool TryAddCount();
member this.TryAddCount : unit -> bool
Public Function TryAddCount () As Boolean
Retours
true si l’incrément a réussi ; sinon, false. Si CurrentCount elle est déjà à zéro, cette méthode retourne false.
Exceptions
L’instance actuelle a déjà été supprimée.
CurrentCount est égal à Int32.MaxValue.
Voir aussi
S’applique à
TryAddCount(Int32)
Tente d’incrémenter CurrentCount par une valeur spécifiée.
public:
bool TryAddCount(int signalCount);
public bool TryAddCount(int signalCount);
member this.TryAddCount : int -> bool
Public Function TryAddCount (signalCount As Integer) As Boolean
Paramètres
- signalCount
- Int32
Valeur par laquelle augmenter CurrentCount.
Retours
true si l’incrément a réussi ; sinon, false. S’il CurrentCount est déjà à zéro, cela retourne false.
Exceptions
L’instance actuelle a déjà été supprimée.
signalCount est inférieur ou égal à 0.
CurrentCount
+
signalCount est égal ou supérieur à Int32.MaxValue.