Download presentation
Presentation is loading. Please wait.
Published byAbigail Mills Modified over 9 years ago
4
New team member / new project for the team Helps analyze relationships and structure Understanding code Locates code in unfamiliar code bases Understand call graphs Navigating code Consume first development Code generation Writing code Stepping behavior Inspect object properties Debugging code
7
VS 2010 “Navigate To” Support
8
View Call Hierarchy VS 2010 introduces a new “View Call Hierarchy” feature that allows you to quickly discover where a particular method or property within your code-base is being called from
9
View Call Hierarchy
12
Multiple Monitor Support:
15
Code Intellisense with VS 2008
16
Code Intellisense with VS 2010
17
VS 2010’s Multi-Targeting Support Microsoft has made some pretty major architectural changes with VS 2010 to enable much better and more accurate multi-targeting support. They also updated the VS 2010 debugger, profiler and compilers to be able to target multiple versions of the CLR.
18
Moving a Project from.NET 2.0 to.NET 4.0 We can optionally retarget our project to work with a later version of.NET by right-clicking on the project within the solution explorer and by bringing up its properties dialog. We can select the “target framework” dropdown within it and select the version of the.NET Framework we want to target:
19
ASP.NET Version:
20
Share Point Integration in 2010 Visual Studio 2010 now includes built-in support for building SharePoint applications. You can now Create,edit,build and debug SharePoint applications directly within Visual Studio 2010. You can also now use SharePoint with TFS 2010. ASP.NET, HTML, JavaScript Snippet Support (VS 2010 and.NET 4.0 Series) Snippets allow you to be more productive within source view. Allowing you to create chunks of code with a minimum of character typing. Visual Studio has supported the concept of “snippets” for VB and C# in previous releases – but not for HTML, ASP.NET markup and JavaScript. With VS 2010 we now support snippets for these content types as well.
21
Snippet for loginView Control:
23
C# 1.0 C# 2.0 C# 3.0 Managed Code Generics Language Integrated Query C# 4.0 Dynamic Programming
24
C# 4.0 Language Innovations
25
Introduction Since the inception of C#, each version bought some major changes and amendments in the language. For example, in C# 1.0, the major theme was Managed Code. Then in C# 2.0, Generics were introduced and lastly in C# 3.0 LINQ was introduced. C# 4.0 introduced the concept of Dynamic Programming in C#. Overall there are four main features that are introduced in the upcoming C# 4.0: Dynamic Programming C# 4.0 supports Dynamic Programming by introducing new Dynamic Typed Objects. The type of these objects is resolved at run-time instead of at compile-time.
26
A new keyword dynamic is introduced to declare dynamic typed object. The keyword tells the compiler that everything to do with the object, declared as dynamic, should be done dynamically at the run-time using Dynamic Language Runtime(DLR) Before Dynamic Programming the code for reflection is like: After Dynamic Programming Introduced in C# 4.0:
27
From the above slide, you can call method(s) such as x.ToString(), y.ToLower(), z.Add(1), etc. and it will work smoothly. :) This feature is great and provides much flexibility for developers. Of course there are pros and cons of dynamic programming as well but where C# is going is something like having features of both static languages and dynamic languages.
28
Optional Parameters The second feature is Optional Parameters. Let’s say I have a class Employee and I provide few overloads of the constructor to enable making certain parameters as optional as follows:
29
With C# 4.0, you need to create just one constructor for that as follows: As simple as that :) and you can easily call that as follows: Named Argument: we discussed an example of Employee class in which we passed some optional parameters in the constructor:
30
And I can simply call that as shown below: A question can be raised "Is there any way that we can skip qualification, i.e. third parameter and give the last parameter of middleName?" "Yes absolutely, we can and that feature is called Named Argument in C# 4.0."
31
Optional “ref” modifier object fileName = "Test.docx"; object missing = System.Reflection.Missing.Value; doc.SaveAs(ref fileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing); object fileName = "Test.docx"; object missing = System.Reflection.Missing.Value; doc.SaveAs(ref fileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing); doc.SaveAs("Test.docx"); doc.SaveAs("Test.docx");
32
Clean Web.Config Files The new.NET 4 machine.config file now automatically registers all of the ASP.NET tag sections, handlers and modules that we’ve added over the years, including the functionality for: ASP.NET AJAX ASP.NET Dynamic Data ASP.NET Routing (which can now be used for both ASP.NET WebForms and ASP.NET MVC) ASP.NET Chart Control (which now ships built-into ASP.NET V4) What this means is that when you create a new “Empty ASP.NET application” project in VS 2010, you’ll find that the new default application- level web.config file is now clean and simple:
33
Web.Config files in.Net 4
34
Auto-Start ASP.NET Applications Some web applications need to load large amounts of data, or perform expensive initialization processing Developers using ASP.NET today often do this work using the “Application_Start” event handler within the Global.asax file ASP.NET 4 ships with a new feature called “auto-start” that better addresses this scenario. You can do this by opening up the IIS 7.5 applicationHost.config file (C:\Windows\System32\inetsrv\config\applicationHost.config)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.