Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

I am Jalpesh Vadgama a Microsoft MVP for Visual C# and BrainBench Certified ASP.NET Developer having more then 6 years of experience in .NET Technology.
Browse by Tags · View All
#ASP.NET 88
#DOTNET 87
BRH 79
ASP.NET 72
#.NET 52
C#.NET 48
DOTNET 44
ASP.NET 4.0 31
ASP.NET MVC 29
VisualStudio 27

Archive · View All
December 2010 16
July 2011 13
April 2011 13
April 2012 12
January 2011 12
June 2011 11
May 2011 11
May 2012 8
February 2013 7
January 2013 7

Code refactoring with Visual Studio 2010-Part 3

Jun 28 2011 5:57PM by Jalpesh   

I have been writing few post about Code refactoring features of visual studio 2010 and This blog post is also one of them. In this post I am going to show you reorder parameters features in visual studio 2010. As a developer you might need to reorder parameter of a method or procedure in code for better readability of the the code and if you do this task manually then it is tedious job to do. But Visual Studio Reorder Parameter code refactoring feature can do this stuff within a minute. So let’s see how its works. For this I have created a simple console application which I have used earlier posts . Following is a code for that.

using System;

namespace CodeRefractoring
{
    class Program
    {
        static void Main(string[] args)
        {
            string firstName = "Jalpesh";
            string lastName = "Vadgama";

            PrintMyName(firstName, lastName);
        }

        private static void PrintMyName(string firstName, string lastName)
        {
            Console.WriteLine(string.Format("FirstName:{0}", firstName));
            Console.WriteLine(string.Format("LastName:{0}", lastName));
            Console.ReadLine();
        }
    }
}

Above code is very simple. It just print a firstname and lastname via PrintMyName method. Now I want to reorder the firstname and lastname parameter of PrintMyName. So for that first I have to select method and then click Refactor Menu-> Reorder parameters like following.

ReOrderParameters

Once you click a dialog box appears like following where it will give options to move parameter with arrow navigation like following.

ReorderParameterDialog

Now I am moving lastname parameter as first parameter like following.

ReOrderParameterAfterReordering

Once you click OK it will show a preview option where I can see the effects of changes like following.

PreviewOption

Once I clicked Apply my code will be changed like following.

using System;

namespace CodeRefractoring
{
    class Program
    {
        static void Main(string[] args)
        {
            string firstName = "Jalpesh";
            string lastName = "Vadgama";

            PrintMyName(lastName, firstName);
        }

        private static void PrintMyName(string lastName, string firstName)
        {
            Console.WriteLine(string.Format("FirstName:{0}", firstName));
            Console.WriteLine(string.Format("LastName:{0}", lastName));
            Console.ReadLine();
        }
    }
}
As you can see its very easy to use this feature. Hoped you liked it.. Stay tuned for more.. Till that happy programming.
Shout it

Tags: BRH, #DATAACCESS, #DOTNET, DOTNET, VisualStudio, VisualStudio2010, CodeRefactor,


Jalpesh
15 · 11% · 3478
0
Liked
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]