Advertisement

Responsive Advertisement

IV. Getting Start with Visual C# 2015



To open the program, follow the steps below:
1. Click the Start Button>
2. All Program>
3. Microsoft Visual Studio 2008>
4. Microsoft Visual Studio 2008>
5. Choose General Development Settings>
6. Click the Start Visual Studio Button>





7. Click File Menu>

8. New>

9. Project>

10. Choose Visual C #>

11. Select Console Application>

12. In the Name box, enter a name.

13. In the Location box, select Save Location>

(Ex: TextHello)>

14. Click OK Button>



15. Here are the results.


Getting started coding:
The following example shows coding showing Welcome to Enter on the Screen:




Using Comment C#

In this article, we will learn about C# comments, different style of comments, and why and how to use them in a program.

Comments are used in a program to help us understand a piece of code. They are human readable words intended to make the code readable. Comments are completely ignored by the compiler.

In C#, there are 3 types of comments:

Single Line Comments ( // )
Multi Line Comments (/* */)
XML Comments ( /// )

Single Line Comments
Single line comments start with a double slash //. The compiler ignores everything after // to the end of the line.

Multi Line Comments
Multi line comments start with /* and ends with */. Multi line comments can span over multiple lines.

XML Documentation Comments
XML documentation comment is a special feature in C#. It starts with a triple slash /// and is used to categorically describe a piece of code.. This is done using XML tags within a comment. These comments are then, used to create a separate XML documentation file.

If you are not familiar with XML, see What is XML?

What is XML?
- XML stands for eXtensible Markup Language
- XML is a markup language much like HTML
- XML was designed to store and transport data
- XML was designed to be self-descriptive
- XML is a W3C Recommendation



A software application developed in VB.NET language is built into a VB.NET solution.

A VB.NET solution consists of one or more projects.
A project VB.NET generates one or more fundamental installation units exedll.
An installation unit is generated from one or more source files.


A source file contains the definition and implementation of classes of objects, structures, modules, interfaces. These elements include the developer’s source code.
To create a VB.NET solution, it is done as follows:

  • programming environment Visual Studio 2008 is open;
  • it displays the dialog box New Project from the File menu, group of options New, command Project…;


New Project Dialog Box
  • from the projects list displayed in Project types: select programming language Visual Basic;
  • from the list of templates displayed in Templates: select the type of VB.NET application template to be developed;
  • entering the project name to option Name:;
  • entering the location name to option Location: where the solution is saved; alternative consists in selecting the location on Browse… button;
  • entering the solution name to the option Solution Name:; select the Create directory for solution for saving solution in a folder on disk;
  • select OK button to create the template for VB.NET application under options set by the developer.

Through the dialog box New Project, the options are set to create a VB.NET application skeleton generated by the development environment Visual Studio 2008.
In the sub-folder of the storage solution, two files are generated and a corresponding project sub-folder is implicitly included whithin solution.
Solution sub-folder has the solution name, and the project carries the name of the project set by the developer in the New Project box.

Opening a VB.NET solution is achieved by launching sln file with a name that carries the solution. Sln file is implicitly included in the solution sub-folder



Post a Comment

0 Comments