New Updates : C# and VB Features in Visual Studio 2015 Update 2

This article for those who wish to learn Visual Studio, VB, C#.

At Build 2016, Microsoft discharged Visual Studio 2015 Update 2 and Visual Studio “15” Preview, this week. Both discharges incorporate numerous new language includes that you can attempt today. It’s sheltered to introduce both adaptations of Visual Studio on the same machine with the goal that you can look at all of the new components for yourself.

New C# and VB highlights in Visual Studio 2015 Update 2

In Visual Studio 2015 Update 2, you’ll see a few upgrades added to past elements and additionally included some new re factorings. The group concentrated on enhancing designer profitability by chopping down time, mouse-snaps, and keystrokes to make the activities you play out each day more effective.

Intuitive Improvements (C#) 

The C# Interactive window and charge line REPL, CSI, were presented in Visual Studio Update 1. In Update 2,the intelligent involvement is matched with the supervisor by permitting engineers to send code pieces from the editorial manager to be executed in the Interactive window. Additionally, the developers are empowered to introduce the Interactive window with an undertaking’s connection.

Feasibility in accessing these components :

Highlight a code bit in the editorial manager, right-snap, and press Execute in Interactive (or Ctrl+E, Ctrl+E).

Right-tap on an undertaking in the Solution Explorer and press Initialize Interactive with the task.

Include Imports Utilizing Improvements (VB and C#)

Adding Imports/Using order is enhanced to bolster “fluffy” coordinating on incorrectly spelled sorts and to look your whole arrangement and metadata for the right sort—including both an utilizing/imports and any undertaking/metadata references, if vital.

The sort name should be settled (two letters are transposed) and the System .Net utilizingshould be included.


A couple refactorings are sprinkled in were :

- Make strategy synchronous (VB and C#)

- Use invalid contingent for representative conjuring (C#)

Along these lines, the executioner situation for this element is bringing events up in a string safe manner. Before C# 6 the best possible approach to do this was to duplicate the sponsorship field of the event to a nearby variable, check the variable for invalidness and summon the agent inside the if.

Generally, Thread B could set the agent to invalid by expelling the last handler after Thread A has checked it for invalid bringing about Thread An unexpectedly tossing a NullReferenceException. Utilizing the invalid restrictive as a part of C# is a much shorter type of this example.

Be that as it may, in VB the RaiseEvent explanation effectively brought the event up in an invalid safe manner, utilizing the same code-gen. So the executioner situation for this refactoring truly didn’t exist and more regrettable, in the event that we include the refactoring individuals may erroneously change their code to be less colloquial with no advantage. Every now and then we survey tests that don’t comprehend this and play out the invalid check unequivocally at any rate so this appears to be prone to strengthen that excess conduct.

Roslyn Features (VB and C# in Update 2)

Addition of two new compiler banners to the Roslyn compiler :

deterministic: This switch will guarantee works with the same inputs deliver the same the yields, byte for byte. Beforehand, PE entries–like MVID, PDB ID and Timestamp–would change on each form yet now can be figured deterministically taking into account the inputs.

publicSign : Supports another technique for marking that is like deferral marking aside from it doesn’t have to add skip check passages to your machine. Doubles can be open marked with just the general population key and load into settings vital for improvement and testing. This is otherwise called OSS marking.

For .NET training and placement reviews, please do visit CRB Tech Reviews.

Most Related Articles :

Top 5 Reasons That Make ASP.NET More Secure Over PHP