ReaderWriterLock Construtor
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Inicializa uma nova instância da classe ReaderWriterLock.
public:
ReaderWriterLock();
public ReaderWriterLock();
Public Sub New ()
Exemplos
O exemplo de código a seguir demonstra como criar uma nova instância da ReaderWriterLock classe.
Esse código faz parte de um exemplo maior fornecido para a ReaderWriterLock classe.
// The complete code is located in the ReaderWriterLock class topic.
using System;
using System.Threading;
public class Example
{
static ReaderWriterLock rwl = new ReaderWriterLock();
// Define the shared resource protected by the ReaderWriterLock.
static int resource = 0;
' The complete code is located in the ReaderWriterLock class topic.
Imports System.Threading
Public Module Example
Private rwl As New ReaderWriterLock()
' Define the shared resource protected by the ReaderWriterLock.
Private resource As Integer = 0
}
End Module