GithubHelp home page GithubHelp logo

marekkacprzak / csharpeleven Goto Github PK

View Code? Open in Web Editor NEW

This project forked from khalidabuhakmeh/csharpeleven

0.0 0.0 0.0 38 KB

C# 11 What's New Features (made for JetBrains Rider)

C# 100.00%

csharpeleven's Introduction

C# 11 What's New Features

This is a project to show all the new C# 11 features coming in .NET 7 that are mentioned in the Microsoft Documentation.

The samples found in Program.cs are runnable using JetBrains Rider 2022.3+.

You can give things a try.

  1. File-scoped types
  2. Generic Math support
  3. Auto-default structs
  4. Pattern matching Span on a constant string
  5. Extended nameof scope
  6. Numeric IntPtr
  7. Utf-8 string literals
  8. Required Members
  9. ref fields and scoped ref
  10. Raw string literals
  11. Improved method group conversion to delegate
  12. Generic Attributes
  13. Newlines in string interpolation expressions
  14. List Patterns
  15. Warning Wave 7 (lot's of Roslyn-based warnings about code issues. Not shown in this project.)

Opinions

Most of the features in C# 11 seem to be focused on low-level optimization and most folks will likely use a handful of these features, rather than "ALL OF THEM". Although, they will benefit from these features, as these are used internally by the .NET team to optimize hot path scenarios. We all win!

My favorite features that you'll likely use are:

  • #10: Raw string literals (be sure to try it with Rider's language inject ๐Ÿ‘จ๐Ÿปโ€๐Ÿณ๐Ÿ˜˜)
  • #11: Improved method group conversion to delegate. (You're likely already using it now. So free perf!)
  • #12: Generic Attributes. Heck to the Yeah!
  • #8: Required Members (less boilerplate is always good)
  • #14: List Patterns (This is a "maybe", and LINQ is also a good option)

In general, this is a good iterative update to the C# language but nothing as dramatic as LINQ, pattern matching, async/await or records. That's likely a good thing for many developers still trying to catch up.

csharpeleven's People

Contributors

khalidabuhakmeh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.