plc.myforum.ro Forum Index plc.myforum.ro
PLCs users www.plc.myforum.ro!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

C# Version 7 - Introduction to new language features

 
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> Programming
View previous topic :: View next topic  
Author Message
kosta
Member
Member


Joined: 09 Aug 2015
Posts: 161
Location: Salonic

PostPosted: 12/12/2016 20:55    Post subject: C# Version 7 - Introduction to new language features Reply with quote

C# Version 7 - Introduction to new language features
Rasik Bihari Tiwari, 9 Dec 2016
https://www.codeproject.com/Articles/1156167/Csharp-Version-Introduction-to-new-language-featur

Introduction
Let us dive into something really latest in the world of .Net. Microsoft is about to release a new version of C# language - version 7.0. Let's learn all its new features so that it can be handy whenever we upgrade our existing projects/solution to Visual Studio 15.
Background

I was going through a wiki on C# language created by Jon Skeet (my most favourite developer on this planet) on stackoverflow.com website. Here is the link to the question which talks about version history of C# language.

C# language version wiki on stackoverflow.com
http://stackoverflow.com/questions/247621/what-are-the-correct-version-numbers-for-c/35013973
I suddenly noticed that the accepted answer doesn't mention the C# language version 7 which gave me a realization that it is not yet updated as the language version is yet to come to RTM milestone. So, I thought this particular language version is still in nascent phases of development so it will be exciting to share the detail of all new upcoming features in this language version to avid blog readers. Hence I incepted this article.
Prerequisites

A basic knowledge of C# language and Visual Studio (VS) IDE from Microsoft is desired while reading this article and for using the attached source code.
A note for attached code

You need following softwares as prerequisite to run the attached code on your computer:

Visual Studio 15 Preview 5 - First and foremost thing to understand is that Visual Studio 15 is NOT Visual Studio 2015. Visual Studio 2015 is the last RTMed version of Visual Studio which is currently available in market. Visual Studio 15 is the next Visual Studio version to be released in market. It will either be named (colloquial name) as Visual Studio 2016 or Visual Studio 2017 when it gets finally RTMed.
An active internet connection - This is needed to download the nuget packages referenced in the attached source code. Before creating a zip of the source code I emptied the packages directory because of its size (> 200 MB). The ocazie you rebuild the solution all the packages will get downloaded automatically if you have an active internet connection and then the sample code should run smoothly.

C# v7 features can work in VS 2015 also but that requires few configurations. So, best way to deal with this is to get the preview build of VS 15 from here. At the time of this writing the latest build is being named "Preview 5". Install VS 15 Preview 5 to get started.

Note: C# v7 is not yet in RTM state. So, this feature list might not be exhaustive and complete from the final release stand-point. As the C# compiler team continues to work really hard, we can see more and more features working in new preview releases. Keep a watch on this blog post as I will keep updating it as more and more features become visible and runnable on Visual Studio 15. For absolutely latest updates you can check their GitHub page here.
https://github.com/dotnet/roslyn/issues/2136

[URL=https://userscloud.com/w1dhthpiik9g]CSharp7LangaugeFeatures.zip - 17 KB[/URL]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> Programming All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro