Can you program in just C#?

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.
 

randomizer

Distinguished
Moderator
Jul 24, 2006
880
0
19,260
62
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.
 

Charles A Peirce

Estimable
May 19, 2015
6
0
4,520
2


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.
 
Thread starter Similar threads Forum Replies Date
D Apps General Discussion 1
BlueMoon1890 Apps General Discussion 0
Neon The (Anthro) Umbreon Apps General Discussion 1
K Apps General Discussion 2
T Apps General Discussion 10
M Apps General Discussion 2
R Apps General Discussion 3
S Apps General Discussion 2
N Apps General Discussion 1
P Apps General Discussion 4
A Apps General Discussion 8
M Apps General Discussion 6
S Apps General Discussion 1
C Apps General Discussion 5
H Apps General Discussion 3
A Apps General Discussion 1
U Apps General Discussion 1
F Apps General Discussion 3
F Apps General Discussion 7
S Apps General Discussion 4

ASK THE COMMUNITY