Barbara Doyle Jacksonville University What’s New with Visual Studio and C#?
Game Plan .NET Journey … some nostalgia Where are we now? Recent announcements… Xamarin partnership New Visual Studio enhancements C# 6.0 language features Future 2015 Cengage Learning Computing Conference2
3
4 C# 6.0.NET Framework 4.6
Recent Announcements… Visual Studio “Community Edition” . NET Framework 4.6 to be shipped with VS 2015 Cross Platform Development Xamarin Partnership 2015 Cengage Learning Computing Conference5
6
Recent Announcements… Open-source CLR, Just-In-Time Compiler (JIT), Garbage Collector (GC), and core.NET base class libraries Several key components, like ASP.NET and the C# compiler previously open sourced .NET Compiler Platform (“Roslyn”) provides open source C# and Visual Basic compilers with rich code analysis APIs 2015 Cengage Learning Computing Conference7
Recent Announcements… 2015 Cengage Learning Computing Conference8 .NET Core Framework on Linux and OSX (Mac)
Recent Announcements… .NET Core project is under the stewardship of the.NET Foundation Transferring source to GitHub 2015 Cengage Learning Computing Conference9
10 GitHub Open Source Repository
Xamarin Partnership 2015 Cengage Learning Computing Conference11
Xamarin Partnership Little Xamarin history Sponsor Mono community Xamarin already produces a cross-platform open source.NET framework based on C# Making it easier to add Xamarin tools to support iOS and Android development alongside Windows apps 2015 Cengage Learning Computing Conference12
New Visual Studio Enhancements No major chances to new editor Menus now appear in Title Case style instead of all capitals Windows touch gestures now supported New project type templates Cross platform Development Visual Studio Emulator for Android Empty shared project template 2015 Cengage Learning Computing Conference13
New Visual Studio Enhancements Debugging Tools New Breakpoint Settings Window PerfTips (tooltips with performance information) Few new code editor user interface editing tools Window layouts Quick action light bulb icon Colorized tooltips Simplified rename Enhanced Peek Definition 2015 Cengage Learning Computing Conference14
Touch Support Gestures Available 2015 Cengage Learning Computing Conference15 Scroll (tap-and-drag on the editor surface on the regular and enhanced scrollbars) Pinch-to-Zoom in/out Select a whole line by tapping in the editor margin Select words by double-tapping them Invoke the editor context menu by pressing-and- holding on words
New Project Type Templates 2015 Cengage Learning Computing Conference16 Over 40 templates with current VS 2015 CTP release + Xamarin install
New Breakpoint Settings Window Two new icons appear with breakpoint 2015 Cengage Learning Computing Conference17
New Breakpoint Settings Window Settings opens Peek window 2015 Cengage Learning Computing Conference18
PerfTips Performance Information at-a-glance Step over lines of code (F11) or run from breakpoint to breakpoint debugger displays PerfTip Clicking on time, displays Diagnostics Tools windows revealing CPU and Memory usage 2015 Cengage Learning Computing Conference19
New Code Editor User Interface Tools No major improvements … few changes Configure and save window layouts Quick action light bulb icon Colorized tooltips Simplified rename Enhanced Peek Definition 2015 Cengage Learning Computing Conference20
Configure and Save Windows Layouts 2015 Cengage Learning Computing Conference21 Console App Windows App
Quick Action Light Bulb Icon Streamlines Code 2015 Cengage Learning Computing Conference22
Quick Action Light Bulb Icon 2015 Cengage Learning Computing Conference23
Quick Action Light Bulb Icon Provides preview of changes 2015 Cengage Learning Computing Conference24
Quick Action Light Bulb Icon Syntax Help 2015 Cengage Learning Computing Conference25
Colorized Tooltips Hover over collapsed code to pop up tooltip in color 2015 Cengage Learning Computing Conference26
Colorized Tooltips Keywords shown in blue within tooltip Hover over methods to see its signature in color 2015 Cengage Learning Computing Conference27
Simplified Rename 2015 Cengage Learning Computing Conference28
Enhanced Peek Definition 2015 Cengage Learning Computing Conference29 Bring definition of method or class into file
Enhanced Peek Definition Peek released as part of Visual Studio Cengage Learning Computing Conference30
C# 6.0 Language Features Current Language Specification C# 5.0 Released August 2012 No BIG new concepts with 6.0 Auto-properties can have initializers and no longer require setters Constructors can assign values to read-only properties 2015 Cengage Learning Computing Conference31
C# 6.0 Language Features Many small features added Using clauses for static classes bring static members directly into scope Exception can have filters New string interpolation Null conditional operator added 2015 Cengage Learning Computing Conference32
Getter-only Auto-properties 2015 Cengage Learning Computing Conference33
Auto-property Initializers 2015 Cengage Learning Computing Conference34
Assignment to Read-only Auto-properties in Constructors 2015 Cengage Learning Computing Conference35
Static using Statements 2015 Cengage Learning Computing Conference36 Without using static directive, would write Console.Clear( ); inValue = Console.ReadLine( ); Console.WriteLine(ln ); Console.ReadKey( );
Static using Statements Static Math class has number of static members using static System.Math; Instead of writing ans = Math.Pow(arg1, 3); with additional using statement, write: ans = Pow(arg, 3); 2015 Cengage Learning Computing Conference37
Exception Filters Add an if statement to catch clause for a try…catch…finally statement // body of catch clause 2015 Cengage Learning Computing Conference38
String Interpolation Previously would have written: return String.Format("{0} {1}\nAmt: {2 :F2}", first, last, amt); 2015 Cengage Learning Computing Conference39
Null Propagating Operator ?. Saves you from writing lots of if statements 2015 Cengage Learning Computing Conference40
Available for fall classes Targets C# 6.0 with Visual Studio Cengage Learning Computing Conference41
Resources Languages features in C# 6 and VB features-in-C%23-6-and-VB-14 features-in-C%23-6-and-VB-14 VS2015 Preview features – preview-vs.aspx preview-vs.aspx Barbara Doyle, Jacksonville University Cengage Learning Computing Conference42
Summing up! New Visual Studio release anticipated Late Spring/Summer 2015 Free Community Edition Heavy emphasis on cross-platform development opportunities Xamarin partnership Free student access with registration No major enhancements with VS 2015 or C# 6.0 Everything is still subject to change…still a preview after all 2015 Cengage Learning Computing Conference43