GIAC
GSSP-NET · Question #259
You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a Windows application using the .NET Framework. You…
The correct answer is C. It will throw a SemaphoreFullException. See the full explanation below for the reasoning.
Question
You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a Windows application using the .NET Framework. You create a Semaphore class instance in the application by using the following code snippet:
Semaphore tSema = new Semaphore(0, 5); ... tSema.Release(6); What will the above code segment do?
Options
- AIt will set the maximum count for the semaphore to 6.
- BIt will set the initial count for the semaphore to 5.
- CIt will throw a SemaphoreFullException.
- DIt will throw a ThreadAbortException.
How the community answered
(31 responses)- A3% (1)
- B13% (4)
- C77% (24)
- D6% (2)
Community Discussion
No community discussion yet for this question.