Skip to content

Commit b88c9a0

Browse files
authored
Use throw expression
1 parent 9176a3e commit b88c9a0

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/NetMQ/NetMQRuntime.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,7 @@ public NetMQRuntime()
3636
/// </summary>
3737
public static NetMQRuntime Current
3838
{
39-
get
40-
{
41-
var result = s_current.Value;
42-
if (result == null)
43-
throw new InvalidOperationException("NetMQRuntime.Current is not available on this thread. Ensure that a NetMQRuntime has been created.");
44-
else
45-
return result;
46-
}
39+
get => s_current.Value ?? throw new InvalidOperationException("NetMQRuntime.Current is not available on this thread. Ensure that a NetMQRuntime has been created.");
4740
}
4841

4942
internal static NetMQPoller Poller

0 commit comments

Comments
 (0)