The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
ReaderWriterLock Constructor ()
.NET Framework (current version)
Initializes a new instance of the ReaderWriterLock class.
Assembly: mscorlib (in mscorlib.dll)
The following code example demonstrates how to create a new instance of the ReaderWriterLock class.
This code is part of a larger example provided for the ReaderWriterLock class.
// The complete code is located in the ReaderWriterLock // class topic. using namespace System; using namespace System::Threading; public ref class Test { public: // Declaring the ReaderWriterLock at the class level // makes it visible to all threads. static ReaderWriterLock^ rwl = gcnew ReaderWriterLock; // For this example, the shared resource protected by the // ReaderWriterLock is just an integer. static int resource = 0;
.NET Framework
Available since 1.1
Available since 1.1
Show: