C# 7.0: Throw expressions

added by DotNetKicks
4/5/2017 6:29:44 AM

1 Kicks, 275 Views

C# 7.0 introduces throw expressions. We can add exception throwing to expression-bodied members, null-coalescing expressions and conditional expressions. This blog post introduces throw expressions, demonstrates how to use them and also provides a peek behind a compiled throw expressions. Throw expressions are the way to tell compiler to throw exception under specific conditions like in expression bodied members or inline comparisons.


0 comments