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...
Step-by-Step Guide
-
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. -
Step 2: Run the downloaded executable and follow these steps: Next.
I agree → Next.
Select MSDN, not SQL → Next.
Install. ,,,,,"); Console.ReadLine() -
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. , -
Step 4: Go to File → New → Project.
-
Step 5: Select Visual C# → Windows → Console Application.
-
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) { } } }
-
Step 7: Beneath static void Main(string[] args)
-
Step 8: after the first curly brace
-
Step 9: type: Console.WriteLine("Hello
-
Step 10: World!
-
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
-
Step 12: World!
-
Step 13: Click the Run button on the toolbar.Congratulations!
-
Step 14: You need CVS and GNU build tools.
-
Step 15: Go to the DotGNU project (http://www.gnu.org/software/dotgnu/) that provides FOSS implementation of C#.
-
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.
-
Step 17: Try to start some examples that also come in precompiled (.exe) form.
-
Step 18: Under Linux
-
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.
-
Step 20: Figure out yourself how to compile the short example
-
Step 21: given in the "Windows way" section.
-
Step 22: Congratulations
-
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
Samuel Sanchez
Dedicated to helping readers learn new skills in lifestyle and beyond.
Rate This Guide
How helpful was this guide? Click to rate: