Main menu

Pages

      Featuring programming language C Sharp , and feeds them flexibility and ease

of programming special applications windows, and by using ready - made frames feature .net Framework, which took great features of the language  of programming  C ++ C ++ and Visual Basic language visual basic.

C # Programming


A brief history of the  C Sharp programming language  :

     The first version of the programming language C # 1.0 was released at the beginning of 2001.
After that, the second version of this language C#  2.0 was released  in 2005, at the same time, Visual Studio 2005 was launched from Microsoft's way, used specifically for programming programs running on Windows, and during this time, new features were developed and added to this language, including Generics and the functions are unknown anonymous methods. As for the C # 3.0 version that was launched in conjunction with Visual Studio 2008, the latest version is  C # 4.0 which has been optimized for compatibility with other programming languages ​​and to enjoy all the features and features that have been added. Microsoft Visual Studio 2010 was released that supports this language in all respects, in addition to an explanation of the use of each of the c # .net functions, which will help you a lot as a developer and programmer.

The software and tools you need for a start in the world of  programming in  C Sharp:

Firstly :

- Microsoft Visual C # 2010 Express is best program to be in English because our next lessons will be on the English version, and to download the program click  here   it is free from the official website of Microsoft, after downloading this program and when installing it on your computer it will download the rest of the program from the Internet, and it may This takes time depending on your Internet speed. If you want another download link for the program, contact me on our page or in our group on Facebook.
 You can also use    SharpDevelop 4.3.   Click here  if you want to download it.
You can download the latest version of Visual Studio 2012 Express for Windows Desktop from its official website  from here  .
 After downloading, you will find an iso file that must be decompressed in winrar or powerISO.

Second:

Microsoft net framework may be installed on your computer, especially for Windows 7 owners, if you do not find it, download it by clicking here  .

How to run  Microsoft Visual  C #  2010 Express and open a new project to create your first program: 

 In this lesson, we will talk about how to create a new project in Microsoft Visual C # 2010 Express Console Application, execute our first program in C Sharp, and then save the project.

  After installing Microsoft Visual C # 2010 Express, follow these steps:
Launch the program from the Start menu or type in the Microsoft Visual C # 2010 Express search menu
Run Microsoft Visual C # 2010 Express Open a new project

After running the program, choose New project in the workspace that appears in front of you or from the File menu choose New project:

Run Microsoft Visual C # 2010 Express Open a new project
 - A window appears, select Console Application, and write the name of the project at the bottom, for example hello Project, then press OK.

Run Microsoft Visual C # 2010 Express Open a new project

After clicking OK, the bottom window appears:

C Sharp Program Structure Explain the structure of the C Sharp Program


1 - These are libraries of functions that must be called. Currently I am writing them as they are because we will not need to change them in simple programs.
2 - The body of the main program, and inside it we can write on several categories.
3 - The main category of the program, and inside it we can write several functions. 
4 - The main function of the program we write the lines, codes and programming expressions that we need inside it.

Example Add the following lines inside the main function of the program:
      Console.WriteLine ("hello World!");  
The first line displays the sentence hello World! In the screen and then moves to the next line by the WriteLine function
    
 Console.Write ("hello World! This is My first Program in C sharp");
The second line shows hello World! This is My first Program in C sharp at the screen in the same line with the Write function.
       Console.ReadLine ();
The third line keeps the program  open for us  when executed so that we can see it.

The program becomes as follows:

using  System;
using  System.Collections.Generic;
using  System.Text;

namespace  ConsoleApplication1
{
    class  Program
    {
        static void Main (string [] args)
        {
            Console.WriteLine ("hello World!");
            Console.Write ("hello World! This is My first Program in C sharp");
            Console.ReadLine ();
        }
    }
}

To execute the program, click on the word "debug" in the main menu of the program at the top, then click on "Start debugging".
You can also execute the program by clicking on the green arrow or triangle at the top. Or, directly press the F5 button.

Finally, to save the project, click on file in the main menu, then Save All, and select the location and name of the project.




read also : 

New service to get hosting for your website with paid specifications for free in this simple way


reactions

Comments