CATEGORII DOCUMENTE | ||
|
||
Asp | Autocad | C | Dot net | Excel | Fox pro | Html | Java |
Linux | Mathcad | Photoshop | Php | Sql | Visual studio | Windows | Xml |
The lock keyword can be used as an alternative to the methods of the Monitor class. The following two blocks of code are equivalent:
The following example, Locking.cs, uses the lock keyword instead of the explicit Monitor methods:
using System;The output from Locking.cs will be the same as for MonitorEnterExit (when a parameter has been supplied):
Entered Thread 2
Politica de confidentialitate |
Vizualizari: 430
Importanta:
Termeni si conditii de utilizare | Contact
© SCRIGROUP 2022 . All rights reserved
Distribuie URL
Adauga cod HTML in site