.NET doesn't have semaphores, but it does offer a couple of objects which can do what you want.
The Interlocked class synchronizes access to a protected variable atomically. Meaning that it's Increment & Decrement methods can't be interrupted by another thread.
The Monitor class acts like a critical section, protecting access to a block of code so that only one thread at a time can execute it.
Chip H.