Share Link
Copied to clipboard
Embed on Your Page
Copied to clipboard
We Stand with Ukraine
Try out new C# 7 features by @dotnetfiddle

==============================
NESTED FUNCTIONS
Small helper functions available only in the scope of parent function
==============================

Sum of 20 and 50 is : 70
Multiply of 20 and 50 is : 1000
Sum of 30 and 10 is : 40

==============================
BINARY LITERALS
Declare binary literals
==============================

a:  0050 b:  0050 c:  0050
d:  0100 e:  0100 f:  0100

==============================
ENHANCED OUT VARIABLES
Declare out variable inside the method call
==============================

11/26/2016 12:00:00 AM

==============================
ENHANCED TUPLES
Declare tuples inline
==============================

Count: 4, Sum: 83, Avg: 20.75

==============================
TUPLE DECONSTRUCTION
Access tuple members directly without using tuple name
==============================

Count: 4, Sum: 83, Avg: 20.75

==============================
EXPRESSION BODIED MEMBERS
Use expression bodied methods for properties, constructor and distructor
==============================

Customer Name: Joe Doe, Country: USA

==============================
SWITCH EXPRESSIONS
Check for variable type in switch cases
==============================

Sum is 21

==============================
THROW EXCEPTIONS IN EXPRESSIONS
You can now throw exceptions inline in conditional expressions, null coalescing expressions, and some lambda expressions
==============================

Caught exception: Attempted to divide by zero.
Cached Result
Last Run: 10:53:37 am
Compile: 1.29s
Execute: 0s
Memory: 80kb
CPU: 0.406s