Wednesday, April 21, 2010

Visual Studio 2010 New Feature-Generate From usage.

Visual Studio 2010 is Great IDE and I am exploring everyday a new things. Recently I was working with it and I have found a great features called Generate from usage. This feature is allow us to create a class from the generation from usage. Let’s take a sample example for that. Let’s Create a simple example where we will use a product class which is not there in project. Then from generate from usage feature we will create a product class. Here is code where product class does not exist in my console application project.

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Product objProduct = new Product();
}
}
}
Now lets create a new class from this new feature like following. Goto Product class line right click and then click generate->Class as shown in image below.GenerateClass

That’s is it will create a new class there in your solution like this.

ProductClass

So with this feature you will create as per you usage in class. Hope this will help you.Happy programming..

Shout it
kick it on DotNetKicks.com
Share:

0 comments:

Post a Comment

Your feedback is very important to me. Please provide your feedback via putting comments.

Search This Blog
Loading...
About Me
My Photo

Full Stack Developer,Blogger,Microsoft Mvp, Mentor, Life long learner, 10+ Years of Experience for JavaScript, web and Microsoft technologies. ASP.NET MVC,Web Forms,C#,AngularJs,Golang
Mvp profile
Subscribe to my blog

Enter your email address:

Follow us on facebook
Blog Archive
Total Pageviews