usingSystem;classProgram{staticvoidMain(){char[]array={'z','a','b'};// Convert array to a string and print it.Console.WriteLine("UNSORTED: "+newstring(array));// Sort the char array.Array.Sort<char>(array);Console.WriteLine("SORTED: "+newstring(array));}}
Source code is really just a string of text. You can open most source code in any text editor (like Notepad, vim, textmate, etc) and view the code. The amazing part of the coding process is the compiler. The compiler takes the text that you've written and will convert it to machine code (in the case of languages such as C++) or an intermediary language that can be executed by a Just In Time Compiler (in the case of languages such as C# and Java). You could follow the lessons and learn the basics of the language from reading alone, but you'll need to get a copy of a compiler to run the code in the lessons.
Visual Studio is the compiler and IDE created by Microsoft for Windows computers. Visual Studio has several versions. The professional version can compile C# code, as well as a number of other languages. However, this professional version is expensive. If you are a student you can obtain a free copy of Visual Studio 2008 Professional from Microsoft on theirhttp://www.dreamspark.com(404 link) website.
The free alternative to Visual Studio Professional is Visual Studio Express Edition. Visual Studio Express Edition is perfect for learning how to code in C#, and can be obtained for free from Microsoft on theirhttp://www.microsoft.com/express/vcsharp/ website. This is probably the best choice for learning C# on Wikiversity.
Microsoft offers threeeditions of Visual Studio: Community, Professional, and Enterprise. If you want todownload Visual Studio to learn C#, the Community edition is a powerful IDE and free for personal use.
Visual Studio Code (VS Code) is a free, open-source code editor developed by Microsoft. It is lightweight, highly customizable, and supports a wide range of programming languages, including C#. VS Code is available on Windows, macOS, and Linux, making it a versatile choice for developers working across different platforms. This editor is quickly becoming an industry standard for hobbyists and professionals alike.
Key features of Visual Studio Code include:
To set up C# development in Visual Studio Code, you can install the C# extension from the Visual Studio Code Marketplace.
You can learn more about Visual Studio Code and download it for free from theVisual Studio Code website
JetBrains Rider is a powerful, cross-platform IDE designed for .NET development. It supports a wide array of applications targeting frameworks like .NET, ASP.NET Core, MAUI, and game engines like Unity, Unreal Engine, and Godot. Rider is known for its robust feature set and seamless integration with modern .NET technologies.
Key features of JetBrains Rider include:
You can learn more about JetBrains Rider and download it from theJetBrains Rider website.
Mono is a project lead by Novell with goals to create a .NET compatible set of tools, including a compiler and Common Language Runtime (CLR). Mono is available as source for free, and can be compiled on Linux, BSD, UNIX, macOS, Solaris and Windows. It supports x86, SPARC, PowerPC, ARM, S390, x86_64, IA64 and SPARC processors. You can also get mono as a package for most operating systems. Mono can be downloaded at thehttp://www.mono-project.com/Main_Page website.
MonoDevelop is the accompanying IDE for the Mono Project. It is also available from source, and has many features that make it an easy to use compiler.
| Topics inC# | ||
| Beginners | Intermediate | Advanced |
|---|---|---|
| Part of theSchool of Computer Science | ||