dotnetspider.com
Login Login    Register      

TutorialsForumCareer DevelopmentResourcesReviewsJobsInterviewCommunitiesProjectsTraining

Subscribe to Subscribers
Talk to Webmaster
Tony John

Facebook
Google+
Twitter
LinkedIn
Online Membersanbu
gopal
nitz
Sudip
More...
Join our online Google+ community for Bloggers, Content Writers and Webmasters




Resources » .NET programming » Visual Studio

New features in Visual Studio 2010


Posted Date:     Category: Visual Studio    
Author: Member Level: Gold    Points: 15


In this article I am writing about couple of new features of Visual Studio 2010. The features are usefull to dvelopers yet many of the developers are not aware of such feature inclusion. This is my attempt to introduce couple of features that are useful to the developer in their day to day coding activity.



 



There are so many new features introduced in the VS 2010. Each individual will have
their own liking and style of coding, having said that all new feature introduced
with the VS 2010 may not be equally useful to each one of us.



Below are some of the new features that I think are most useful, in no particular
order.



1. Block selection



The block selection of the text in the code edition has been enhanced in the VS
2010. In new editor you can select the block and insert the new text on every selected
line.



Let me explain what I am saying, for example let us say we have bunch of variable
declaration like below


block selection code sample


At some point of time, let say you feeel that all the above listed variables needs
to be declared as public instead of private.


All you need to do is block select the private key words on different lines, by
holding Alt key down and moving the mouse as shown below. While you have selected
the private keyword on all the lines, type "public", you are done all private are
changed to public.


block selected code sample


2. Call Hierarchy



I found that call Hierarchy is a good feature, especially when you are debugging
some other's code. This feature allows you to find calls that are going out
and coming into a method. The nearest feature in the VS 2008 would be
find
all references.



To see the call hierarchy select the method name and press
Ctrl
+K , Ctrl+T
or right click on the method name and select "View Call Hierarchy".
It will show you a Call hierarchy window as below.


call Hierarchy window


3. Zoom



In VS 2010 code editor we can zoom in and zoom out, by holding down
the Ctrl and rolling the mouse roller.



This is quite usefull feature when you are presenting your code sample. Otherwise
often than not we end up increasing font size of the code editor during demo session.



4. Generate From usage



One another feature that is enhanced or improved
is, generate from usage features. Till VS 2008 we had the ability where you can
generate the stubs for a method that you type in your code.



For e.g if you have class MyClass
that
do not have a method by name MyMethod .



If you realize while coding that you need a method called MyMethod
on MyClass, you can go ahead and type is as if that method is already
available, like below.


generate from usage


A small blue rectangle appears at the left bottom of the method name
as shown above. If you mouse over the blue rectangle you will be presented with
an option to generate the method stubs as below.


generate from usage demo


By choosing that option you can generate the stub for MyMethod on class="SpellE">MyClass without leaving your current code window, meaning
less distraction while you are coding.



In VS 2010 this feature is taken to one level up where
you
have ability to generate the stubs for class itself.
Also it is possible to generate stubs
for Property, field and a new type (enum, interface and
struct
) in addition to method stub.



Below shown are the options



Generating class or type stub\


generate type


Generation field or property stub



generate property



Note: You can also use the short cut Ctrl + . instead
of mouse overring the blue rectagle






Did you like this resource? Share it with your friends and show your love!


Responses to "New features in Visual Studio 2010"
Author: Prachi Kulkarni    29 Apr 2012Member Level: Gold   Points : 0
Hi,
Very much informative and useful.

Regards,
Prachi.



Feedbacks      

Post Comment:




  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)



    Type the numbers and letters shown on the left.


    Next Resource: How Visual Studio 2010 Ultimate edition helps in team productivity?
    Previous Resource: How to get data from DevExpress datagrid to xml file
    Return to Resources
    Post New Resource
    Category: Visual Studio


    Post resources and earn money!
     
    More Resources
    Popular Tags   Tag posting guidelines   Search Tags  
    Visual Studion 2010  .  New features  .  IDE features  .  VS 2010  .  



    Follow us on Twitter: https://twitter.com/dotnetspider

    Active Members
    TodayLast 7 Daysmore...

    Awards & Gifts
    Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.