This article is for the fresher's who are new to programming field. In this article we will show installation of VS 2015 Community edition and simple program.
This article is targeted to the audience who are new to programming world and wants to become programmer by learning through articles. Over here will do the programming in .NET using C# language and IDE(Integrated Development Environment) tool used will be Visual Studio 2015 Community Edition. This is the latest edition of Visual Studio at the time when this article is being written.
Here in this article will show from where to get visual studio setup, download it and how to do installation in local system like desktop system or laptop. Each part of the article will be demonstrated step by step form for clear and better understanding of each topic. Also will show how to write program run very first “Hello” program on the console prompt.
Being new to programming field reader may not be knowing from where to get the installation setup of visual studio tool, is this software tool going to be chargeable or free etc. many questions may be arising in mind. We suggest just relax and just follow this article slowly and steadily you will get answers to all questions arising. Too much thinking will confuse and confusion will generate fear which will lead to major hiccup in learning new programming technology.
Get Visual Studio tool download link from Google
Google is considered one of the best search engine so go to
www.google.com apart from Google there are many search engine like Bing, yahoo etc. We suggest go with google.com as it most used and best search results gets here. So on search field of
www.google.com type this text on “visual studio 2015 community download”.
On the search page will find many links to download the visual studio 2015 community edition. Suggesting to all the learners use reliable source like Microsoft site, visual studio site etc. to download setup file. From non-reliable sources there are chances along with setup file some infected software also getting downloaded which can seriously harm desktop or laptop.
Here will use this link
https://www.visualstudio.com/downloads/ to download visual studio 2015 community edition setup file.
Once the link is open it will land on the visual studio website. On this page there are four flavors of VS 2015 but as decided earlier will go with community edition which is first option download as shown in the image down below. It is free version from Microsoft and widely used as all maximum features of the tool are active. For new learner this edition of VS 2015 is a boon :)
Just click on the “Free download” button, which will download a small exe which will start running the setup installation.
After the exe is downloaded open the folder where exe is downloaded and then do double click and execute the “exe” file which will then open a small open file window with Security Warning. As this exe is downloaded from reliable source of visualstudio.com which belongs to Microsoft stack just without having second thought just click on the “Run” button to start execute the package. It will process of installation.
Please Note: Stay connected to internet with minimum speed of 1 Mbps of internet speed. Recommended speed of internet connection is 2 Mbps to get installation done.
Depending on the speed of internet connection installation timing may vary. So better to connected with recommended internet speed.
Other option to do installation is to download complete ISO file which can be later extracted using
MagicISO. Extract ISO file into a folder from where installation can be run.
This option is available on the same download page
We did the same thing in this article downloaded the ISO file and later extracted into folder of local system as shown in the image down below. Then do double click on “vs_community” in order to start the installation setup of Visual Studio 2015 Community Edition.
It will then open first screen of setup page. Here started setup with warning which states that this Visual Studio works best with IE 10 and in our system IE 10 is not installed. However we can still move ahead with installation setup and later can complete up-gradation of browser.
Just click on “Continue” option available at bottom.
Then select the installation folder along with the installation type (a) Default and (b) Custom
Please Note: Keep set this installation page to default values only. Also ensure that setup will require 9 GB of empty space on your local drive where installation is being carried out. If your local system space runs short than the required space setup will terminate and installation will stop.
Once all above mentioned necessity are full filled then click on Install button available at the bottom right.
Now installation will start its process which will time to complete installation. Also remember to stay connected with internet connection as installation will also require internet.
Towards the end of the installation process it will also do the installation of update 3 package as shown in the image down below.
After the installation is completed it will show following setup completed successful screen. Finally click on the “Restart” button given at the bottom which is essential update some necessary program files to complete the installation which can be taken into the effect after restart only.
Once the system is restarted next is click on the Start Menu of your system and search for Visual Studio 2015 and then click visual studio icon associated text of “Visual Studio 2015” in order to open the tool.
Creating simple Console Application in Windows
On viewing the opened Visual Studio 2015 tool screen do the following: -
Step 1: Click on New Project option available at the left side which will open New project template where there are options to create various projects like Windows, Web, Mobile, Cloud Computing, WCF, Workflow etc.
Step 2: On the left side of New project window there are options to select language of the programming like C# or VB, here selected language to create project is C# and type of project is selected Windows using Console Application.
Step 3: Give a suitable name to the project and select the location to save the project on local drive.
After OK on the New Project screen is clicked it will close that window by saving project type, language selected(C# or VB) as selected by the user along with project name & location to save project on local drive(as given by the user).
Getting familiar with VS IDE(Integrated Development Environment) tool
Visual Studio will now open Console Application project screen which shows source code screen of program.cs and on the right side there is window of Solution Explorer.
Solution Explorer displays structure in hierarchy form under Solution there is Project and under project there are various project files like program.cs, config file and other references file if needed.
On the left side default open is the program.cs file under which there is source code written, on which there is already default system class included on the top required to complete Console Application.
Please Note: On the top there are many menu’s available do not distracted with it. As and when required we will be introducing you to those menu to learn and built project. Currently do not go into much details of this Console Application project screen.
Also on Program.cs where source code is written below to included system class lines there is a hierarchy namespace written with name “ConsoleApplication1” under which there is class with name “Program” and under to that there are method written. This is the location where a developer goes and write the C# code.
Method written here
“static void Main(string args)”
where word written main means the starting point of the program. Whereas “[ ]” means multiple & “args” means parameters can be passed.
Please Note: A namespace can have many classes and a class can have many methods under it.
Now as the default contents of program.cs screen of Console Application is understood next will write a simple program to display text on console prompt.
Writing a simple program
This is a simple program application which will display small text “Learn C# Step by step” on the console prompt.
In C# in order to display a text we have to use system class which by default has already been called at the start. Next important line to display text we have write code with text to display.
Console.WriteLine("Learning C# Step by Step");
Next line written code is to hold the console prompt output screen so that user can read the written text on console prompt.
Once writing of the code within the scope is completed. Next go and click on Buid --> Build Solution.
After Solution of the console application is built successfully go and check output where the exe is deployed. In order to go to project folder directly do a right click on “ConsoleApplication1” of Solution Explorer as shown in the image down below.
Once the File Explorer is open then click on ConsoleApplication1 à Bin à Debug. Now under the Debug folder double click and open ConsoleApplication1.
It will open console prompt window screen with output displayed as “Learn C# Step by Step”.
In this step by step lab of C# we have learned how to download and do the installation Visual Studio 2015 community edition. Also we have run a simple program to display output on the console prompt.
With this lab we also have following learning video for you from our fresher’s Learn C# is 100 hrs series: -