The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,444 other followers

Archive for the ‘C# 8’ Category

Take C# 8.0 for a spin | .NET Blog

Posted by jpluimers on 2018/12/06

[WayBack] Take C# 8.0 for a spin | .NET Blog: A first-hand look from the .NET engineering teams

Either:

download and install Preview 1 of .NET Core 3.0 and Preview 1 of Visual Studio 2019.

or with Visual Studio Code

[WayBack] Bill Wagner on Twitter: “@cecilphillip @MadsTorgersen @VisualStudio @code Yes, install .NET Core 3 preview, add the 8.0 element and it works fine.”

Then play around with:

  • Nullable reference types
  • Ranges and indices
  • Asynchronous streams

Via: [WayBack] Mads Torgersen on Twitter: “I blogged a little walkthrough of the three major C# 8.0 features (nullable reference types, range and index expressions and async streams) shipping in Preview 1 of @VisualStudio 2019 and Preview 1 of .NET Core 3.0. Hope you like it!https://t.co/4uM7JlSRwE”

–jeroen

Read the rest of this entry »

Posted in C#, C# 8, Development, Software Development | Leave a Comment »

C# 8.0 features – an exiting list of new possibilities on the horizon

Posted by jpluimers on 2018/04/04

Shamelessly adapted from [WayBack] C# 8.0 features Extension everything — a new syntax for extension methods that will also allow extension “other things,” like the much-anticipated exte… – Lars Fosdal – Google+, including the original posts where the topics were covered:

C# 8.0 features

Post 1

[WayBack] C# 8.0 Features: A Glimpse of the Future – NDepend: C# 8.0 is on the horizon and will be here before you know it, bringing with it some interesting functionality. Let’s take a peek into the future.

Extension everything — a new syntax for extension methods that will also allow extension “other things,” like the much-anticipated extension properties.

Default implementations on interfaces — this allows you to implement methods on interfaces, giving them a default implementation. That will enable you to add new methods to interfaces without breaking its clients.

Nullable reference types — probably one of the most anticipated features ever. It’s a reinterpretation (a “retcon” for you comic book geeks out there) of all the reference types as nullable and the introduction of a new syntax to denote nullable types, accompanied by several types of static checks, to prevent several classes of errors regarding these types. Say farewell to the null reference exception!

Post 2

[WayBack] C# 8.0 Features: Another Glimpse of the Future – NDepend This post covers two probable C# 8.0 features: null coalescing assignment and records. It explains what they are and reports on their current statuses, as well.

Null coalescing assignment — a very simple feature to shorten the check for null before assigning to a variable.

Records — this one is pretty interesting. It’s basically a very short way for you to declare classes that are only data holders. The compiler gives you Equals and GetHashCode implementations, a constructor, properties, and immutability for free, allowing you to do something more interesting with your life than writing loads of boilerplate code.

Post 3

[WayBack] C# 8.0 Features: A Final Glimpse Of The Future – NDepend: Here’s our final post in our C# 8.0 series, where we glimpse into the future. Today we’ll cover another two possible features: target-typed new expressions and covariant return types.

Target-typed “new” expressions — a way for you to omit the type from a constructor call, making the code simpler and less redundant.

Covariant return types — a much-anticipated feature that allows an overriding method to return a more derived type than the original type from the base class.

I really hope they publish the full specs soon, but given that the C# 7 specs yet have to (see [WayBack] C Sharp (programming language) – Wikipedia: Versions), I do not hold my breath, even though it had lots of interesting new stuff too:

–jeroen

Posted in .NET, C#, C# 7, C# 8, Development, Software Development | Leave a Comment »

 
%d bloggers like this: