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 | Termeni si conditii de utilizare |
Vizualizari: 692
Importanta:
Termeni si conditii de utilizare | Contact
© SCRIGROUP 2024 . All rights reserved