Skip to content

Commit 8d1bdc5

Browse files
authored
Apply suggestions from code review
1 parent 7806c5c commit 8d1bdc5

File tree

1 file changed

+1
-2
lines changed
  • snippets/csharp/Microsoft.Win32.SafeHandles/SafeWaitHandle/Overview

1 file changed

+1
-2
lines changed

snippets/csharp/Microsoft.Win32.SafeHandles/SafeWaitHandle/Overview/sample.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ public UnmanagedMutex(string Name)
5656

5757
public void Create()
5858
{
59-
if (nameValue == null || nameValue.Length == 0)
60-
throw new ArgumentException(nameof(nameValue));
59+
ArgumentException.ThrowIfNullOrEmpty(nameValue);
6160

6261
handleValue = CreateMutex(mutexAttrValue,
6362
true, nameValue);

0 commit comments

Comments
 (0)