first program in visual c#
-
Step 1: Open Visual Studio.
Step 2: Select File -> New -> Project
Step 3: Select Visual C# Template
Step 4: Select Console Application
Step 5: Give Name of Application and Click on OK Button.
Visual Studio will open a Program.cs File; File will have some Namespaces, Class and Main Method.
Step 6: Write the following code (Print number from 1 to 100) in Main Method.
{
for(int count=1;count<=10;count++)
{
Console.WriteLine(count);
}
Console.Read();
} -
Step 1: Open Visual Studio.
Step 2: Select File -> New -> Project
Step 3: Select Visual C# Template
Step 4: Select Console Application
Step 5: Give Name of Application and Click on OK Button.
Visual Studio will open a Program.cs File; File will have some Namespaces, Class and Main Method.
Step 6: Write the following code (Print number from 1 to 100) in Main Method.
{
for(int count=1;count<=10;count++)
{
Console.WriteLine(count);
}
Console.Read();
}You've been here 4 1/2 years and you think that is a question?
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
-
Step 1: Open Visual Studio.
Step 2: Select File -> New -> Project
Step 3: Select Visual C# Template
Step 4: Select Console Application
Step 5: Give Name of Application and Click on OK Button.
Visual Studio will open a Program.cs File; File will have some Namespaces, Class and Main Method.
Step 6: Write the following code (Print number from 1 to 100) in Main Method.
{
for(int count=1;count<=10;count++)
{
Console.WriteLine(count);
}
Console.Read();
}That looks like your homework instructions: I'd strongly suggest you read them carefully and do exactly what they say. Then, press F5 which will compile and (if you typed it all correctly) run your program. It won't however do what it says it will: there is a bug in the code or the description of the code.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
-
Step 1: Open Visual Studio.
Step 2: Select File -> New -> Project
Step 3: Select Visual C# Template
Step 4: Select Console Application
Step 5: Give Name of Application and Click on OK Button.
Visual Studio will open a Program.cs File; File will have some Namespaces, Class and Main Method.
Step 6: Write the following code (Print number from 1 to 100) in Main Method.
{
for(int count=1;count<=10;count++)
{
Console.WriteLine(count);
}
Console.Read();
}I would remove the letter 'i' declared above the for() loop, and use the var keyword inside the for instead. Other than this observation, I am not sure what your question is. :^)
Ben Scharbach Temporalwars.Com YouTube:Ben Scharbach