Created
October 12, 2022 06:47
-
-
Save bartdesmet/5f1d224fcc5aca03a8ab4981b4d8df21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```csharp | |
/* _ __ ___ _ ____ ____ _ __ __ __ _ _ ___ _ _ __ __ | |
(_)/ _| / / | __ _ _ __ __ _ (_)___ / ___/ ___|| |__ __ _ _ __ _ __ / / \ \ / /__ _ __ ___(_) ___ _ __ _ / |/ _ \ ___ _ __ / / | \ \\ \ | |
| | |_ | || |/ _` | '_ \ / _` | | / __| | | \___ \| '_ \ / _` | '__| '_ \ | | \ \ / / _ \ '__/ __| |/ _ \| '_ \(_) | | | | | / _ \| '__| | | | | || | | |
| | _| | || | (_| | | | | (_| | | \__ \ | |___ ___) | | | | (_| | | | |_) | < < \ V / __/ | \__ \ | (_) | | | |_ | | |_| | | (_) | | | | | > > | | |
|_|_| | ||_|\__,_|_| |_|\__, | |_|___/ \____|____/|_| |_|\__,_|_| | .__/ | | \_/ \___|_| |___/_|\___/|_| |_(_) |_|\___/ \___/|_| |_|_| | || | | |
\_\ |___/ |_| \_\ /_//_/ | |
____ _ __ __ _ _ _ _ ___ ___ ___ _ _ _ _ ___ _ ___ | |
/ ___|___ _ __ ___ ___ | | __\ \ / / __(_) |_ ___| | (_)_ __ ___ / ( | ) \ / / |__ __ _| |_( )___ | \ | | _____ _|__ ( | ) \ | |
| | / _ \| '_ \/ __|/ _ \| |/ _ \ \ /\ / / '__| | __/ _ \ | | | '_ \ / _ \ | V V \ \ /\ / /| '_ \ / _` | __|// __| | \| |/ _ \ \ /\ / / / /V V | | | |
| |__| (_) | | | \__ \ (_) | | __/\ V V /| | | | || __/ |___| | | | | __/ | \ V V / | | | | (_| | |_ \__ \ | |\ | __/\ V V / |_| | | | |
\____\___/|_| |_|___/\___/|_|\___(_)_/\_/ |_| |_|\__\___|_____|_|_| |_|\___| | \_/\_/ |_| |_|\__,_|\__| |___/ |_| \_|\___| \_/\_/ (_) | | | |
\_\ /_/ | |
*/ | |
// 10.1. Extended Property Pattern | |
// 10.2. Record Structs | |
// 10.3. Constant Interpolated Strings | |
// 10.4.a. Lambda Improvements - Inferred Types | |
// 10.4.b. Lambda Improvements - Return Types | |
// 10.4.c. Lambda Improvements - Attributes | |
// 10.5. Interpolated String Handler | |
// 10.6. Parameterless Struct Constructors | |
// 10.7. Caller Expression Attributes | |
// 11.1. Extended `nameof` Scope | |
// 11.2. Newlines in String Interpolation Expressions | |
// 11.3. Raw String Literals | |
// 11.4. UTF-8 Literals | |
// 11.5. Pattern Matching on Span<char> | |
// 11.6. List Patterns | |
// 11.7. Improve Method Group Conversion to Delegate | |
// 11.8. Numeric IntPtr and UIntPtr | |
// 11.9. Required Members | |
// 11.10. Auto-Default Struct | |
// 11.11. File-Scoped Types | |
// 11.12. Generic Attributes | |
// 11.13. Unsigned Right Shift | |
// 11.14. Relaxed Shift Operator Requirements | |
// 11.15. Checked User-Defined Operators | |
// 11.16. Static Abstract Interfaces (Generic Math) | |
// Next.1. Semi-Auto-Properties (`field`) | |
// Next.2. Attributes on Main for Top-Level Programs | |
// Next.3. Primary Constructors | |
// Next.4. `params Span<T>` | |
// Next.5. `nameof` Accessing Instance Members | |
// Next.6. Lambda Default Parameters | |
// Next 7. Allow `default` in Deconstruction | |
Console.WriteLine("Hello, C# 10 and 11."); | |
record Person(string Name, int Age, Address Address); | |
record Address(string City); | |
[AttributeUsage(AttributeTargets.Method)] | |
class MyAttribute : Attribute | |
{ | |
} | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment