Sponsored Ad

Friday, April 27, 2012

Natural Number (0 to 10) Series and Series Sum in C#

Do you want to print natural number series and also want to print the sum . Actually it is formula based but if you want to print series also then you have to go with for loop. the program is given below.

If you feel any difficulty while running or understanding the below program, then feel free to comment.

Natural Number (0 to 10) Series and Series Sum in C#

using System;

namespace ConsoleHub
{
    class Programs
    {
        static void Main(string[] args)
        {
            string strSeries = "0";
            int sum = 0;
            for (int i = 0; i <= 10; i++)
            {
                if (i.ToString() != "0")
                {
                    strSeries = strSeries + "+" + i;
                }
                sum = sum + i;

            }
            Console.WriteLine("{0}={1}", strSeries, sum);

            Console.ReadLine();
        }
    }
}

Sunday, July 24, 2011

Publish and Deploy Code using Visual Studio

Visual studio provide very easy and good feature to publish ad deploy the code  and dlls. Follow the below steps to deploy and publish:

Step 1: Right click on project and select the publish option

Publish and Deploy Code using Visual Studio

Step 2: Select the Directory where you want to publish

There is 4 kind of location

  1. Disk Path
  2. File Share
  3. FTP Server
  4. Web site

Select as per your requirement.

Publish and Deploy Code using Visual Studio

Step 3: Select How user will install applcation

Publish and Deploy Code using Visual Studio

Step 4: Select option for application to check for updates.

Publish and Deploy Code using Visual Studio

Step 5: Click on Finish and publish the solution.

Publish and Deploy Code using Visual Studio

Search/Replace Text in Entire Solution by using Visual Studio Search

Visual studio provide different kind of search to find text in file(s) or selected File(s). The search available with VS are:

  1. Quick Find
  2. Quick Replace
  3. Find in files
  4. Replace in Files
  5. Find Symbols

You do any of the above search in visual studio.

To do the search in entire solution Go to Edit Menu –> Find and Replace –> Find in Files

Search/Replace Text in Entire Solution by using Visual Studio Search

Find in Files Search:

Search/Replace Text in Entire Solution by using Visual Studio Search 

Shortcut key to Find in Files : CTRL + SHIFT + F

Sponsored Ad

Development Updates