Solution


Hi,

C# is a programming language that was developed in coordination with the Common Intermediary Language (CIL) and Microsoft .NET Framework.

The .NET Framework is a combination of a virtual machine (runtime) which converts CIL bytecode into x86/ARM machine code on the fly and a set of libraries (the class library) which provide functionality. Since the C in CIL stands for "Common", any language that compiles to CIL can utilize the CIL libraries and run on the .NET runtime. Although C# is perhaps the most common language, Visual Basic .NET, managed C++, and Java are all capable of targeting CIL.

At the center of the class library is the...

randomizer

Distinguished
C# is the language. You don't program in WPF, winforms, console, etc. These are mostly just class libraries which ship with the .NET Framework and enable you to build useful applications. The target option for the C# compiler determines how your code is compiled and consequently loaded by the CLR. This is "Output type" in the Visual Studio project properties. One option is for console applications, another is for Windows applications (this covers anything with a GUI), and another is for a class library (DLL) that can't be executed on its own and needs to be loaded from another application.
 

Pinhedd

Distinguished
Moderator


Hi,

C# is a programming language that was developed in coordination with the Common Intermediary Language (CIL) and Microsoft .NET Framework.

The .NET Framework is a combination of a virtual machine (runtime) which converts CIL bytecode into x86/ARM machine code on the fly and a set of libraries (the class library) which provide functionality. Since the C in CIL stands for "Common", any language that compiles to CIL can utilize the CIL libraries and run on the .NET runtime. Although C# is perhaps the most common language, Visual Basic .NET, managed C++, and Java are all capable of targeting CIL.

At the center of the class library is the standard library. The CIL standard library is similar to the standard library for other languages such as C, C++, and Java. However, the CIL standard library is absolutely massive, much wider in scope than anything before it. The standard library provides a variety of common functionality such as dealing with date/time, files, text encoding, networking, reflection, lists/queues/collections, etc... The standard library is abstract enough to be portable, nothing about it relies on any "Windows Specific" behaviour. In fact, the standard library is standardized, other CIL runtimes such as Mono provide their own runtime for other operating systems such as OSX and Linux.

In addition to the standard library, the .NET framework ships with a variety of auxiliary libraries that are linked to Windows specific behaviour. This includes Windows Presentation Foundation, Windows Forms, Office tools, DirectX, Active Server Pages, etc... These libraries are not standardized, and in many cases are encumbered by patents. While Microsoft has made effects to standardize and unencumber much of this, that process is not yet complete.

If you were to write a program in C# that relied upon only CIL and the CIL standard library that program would run on any CIL virtual machine on any operating system for which an appropriate implementation exists. However, reliance on CIL libraries for which no non-.NET implementation exists would necessarily limit the program to running on Windows for the time being.
 
Solution

Charles A Peirce

Estimable
May 19, 2015
6
0
4,520


Hi JethroStoltzfus,

Yes.

You can write pretty much anything you want in C#, and it will run on almost any computer with Windows. Just press the compile button, then double-click on the file that it makes.

WPF and console are things you can use with C# for specific purposes, but as you don't know what they are right now, you won't need them for some time, if ever. You can safely forget about them for now.

I recommend following the free video tutorials provided by Microsoft, just to get you going. Then have fun.

C# is a great way to learn programming. It is simple to learn, and one company I have worked for has used it for multi-million value projects, so what you learn will be useful if you ever want to work as a programmer.

Plus, from this start there are so many places you can go, so many things you can do once you know C#. I could list them, but it would take all day. Maybe two days. Other languages that will be easier, other operating systems you can write for... Just start now, and the other things will come in time.

I wish you every success with your programming.