How to Create a Program in C Sharp

Go here to download your free copy of Visual C# 2010 Express Edition., Run the downloaded executable and follow these steps: Next., Run Visual C# 2010 Express Edition. , Go to File → New → Project. , Select Visual C# → Windows → Console Application...

23 Steps 1 min read Advanced

Step-by-Step Guide

  1. Step 1: Go here to download your free copy of Visual C# 2010 Express Edition.

    Also available are the 2012 express products, but go with 2010 if you are looking for general c# development.

    Also, 2012 does not work without Windows 7/8.
  2. Step 2: Run the downloaded executable and follow these steps: Next.

    I agree → Next.

    Select MSDN, not SQL → Next.

    Install. ,,,,,"); Console.ReadLine()
  3. Step 3: Run Visual C# 2010 Express Edition.

    "); Console.ReadLine(); } } } , You created your first C# program! This should have produced a console windows, reading Hello World! if it did not, then you did something incorrectly. , This should be included into the majority of Linux distributions. , Read the chapter about the installation.

    These instructions are simple to follow even for beginners. , The project is relatively easy to build from the source so we suggest to try this way first. , For instance, FormsTest.exe will show large collection of various GUI controls.

    The folder pnetlib/samples contains the script ilrun.sh that can launch precompiled executables, for instance sh ./ilrun.sh forms/FormsTest.exe (from inside that folder). ,, If the project web site does not provided enough documentation, try web search.

    If this does not help, post questions to the project mailing lists. ,
  4. Step 4: Go to File → New → Project.

  5. Step 5: Select Visual C# → Windows → Console Application.

  6. Step 6: Press OK. You should see this: using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { } } }

  7. Step 7: Beneath static void Main(string[] args)

  8. Step 8: after the first curly brace

  9. Step 9: type: Console.WriteLine("Hello

  10. Step 10: World!

  11. Step 11: It should look like this: using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Console.WriteLine("Hello

  12. Step 12: World!

  13. Step 13: Click the Run button on the toolbar.Congratulations!

  14. Step 14: You need CVS and GNU build tools.

  15. Step 15: Go to the DotGNU project (http://www.gnu.org/software/dotgnu/) that provides FOSS implementation of C#.

  16. Step 16: You can choose to get the source code and build you C# environment from scratch or you may try pre-compiled distributions first.

  17. Step 17: Try to start some examples that also come in precompiled (.exe) form.

  18. Step 18: Under Linux

  19. Step 19: you can use KWrite or gedit to edit the C# code - the recent versions of both editors support the syntax highlight for this language.

  20. Step 20: Figure out yourself how to compile the short example

  21. Step 21: given in the "Windows way" section.

  22. Step 22: Congratulations

  23. Step 23: you are both C# - aware and not bound to any single C# provider!

Detailed Guide

Also available are the 2012 express products, but go with 2010 if you are looking for general c# development.

Also, 2012 does not work without Windows 7/8.

I agree → Next.

Select MSDN, not SQL → Next.

Install. ,,,,,"); Console.ReadLine()

"); Console.ReadLine(); } } } , You created your first C# program! This should have produced a console windows, reading Hello World! if it did not, then you did something incorrectly. , This should be included into the majority of Linux distributions. , Read the chapter about the installation.

These instructions are simple to follow even for beginners. , The project is relatively easy to build from the source so we suggest to try this way first. , For instance, FormsTest.exe will show large collection of various GUI controls.

The folder pnetlib/samples contains the script ilrun.sh that can launch precompiled executables, for instance sh ./ilrun.sh forms/FormsTest.exe (from inside that folder). ,, If the project web site does not provided enough documentation, try web search.

If this does not help, post questions to the project mailing lists. ,

About the Author

S

Samuel Sanchez

Dedicated to helping readers learn new skills in lifestyle and beyond.

38 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: