New Year Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

GIAC GIAC Secure Software Programmer - C#.NET GSSP-NET-CSHARP Question # 35 Topic 4 Discussion

GIAC GIAC Secure Software Programmer - C#.NET GSSP-NET-CSHARP Question # 35 Topic 4 Discussion

GSSP-NET-CSHARP Exam Topic 4 Question 35 Discussion:
Question #: 35
Topic #: 4

You work as a Windows Application Developer for ABC Inc. The company uses Visual

Studio .NET 2008 as its application development platform. You create a Windows Forms

application using .NET Framework 3.5. You create multiple threads in the application and the

threads will execute the same method. You want to synchronize access to a block of code within the method; thus, no two threads execute the block at the same time. What will you do to accomplish this?

Each correct answer represents a part of the solution. Choose two.


A.

Add a SynchronizationAttribute attribute to the method that the multiple threads will call.


B.

Call the Interlocked.Increment method before the block of code that needs to be synchroni zed.


C.

Call the Monitor.Enter method before the block of code that needs to be synchronized.


D.

Call the Interlocked.Decrement method after the block of code that needs to be synchroniz ed.


E.

Add a Semaphore object to the method that the multiple threads will call.


F.

Call the Monitor.Exit method after the block of code that needs to be synchronized.


Get Premium GSSP-NET-CSHARP Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.