Opens an existing named synchronization event.
| C# | Visual Basic |
public static EventWaitHandle OpenExisting( string name )
Public Shared Function OpenExisting ( _ name As String _ ) As EventWaitHandle
- name (String)
- The name of a system event.
A EventWaitHandle object that represents the named system event.
The OpenExisting method attempts to open an existing named system event.
If the system event does not exist, this method throws an exception instead of creating the system event.
Two calls to this method with the same value for name do not return the same EventWaitHandle object, even though they represent the same named system event.
| Exception | Condition |
|---|---|
| ArgumentException | name is an empty string.
-or-
name is longer than 260 characters. |
| ArgumentNullException | name is a null reference (Nothing in Visual Basic). |
| WaitHandleCannotBeOpenedException | The named system event does not exist. |