I don’t think that you are alone in confusing me. There are already other answers that you should have covered, but I will throw this information out for others.
To find out that .Net is “valid,” simply go to c: \ Windows \ Microsoft.Net \ Framework
There you will see folders that match your version (s). Go to the v2.0.xxxxx folder if you installed it, for example.
This folder contains the framework. Basically you will see a bunch of .exe files and DLL files. All DLL files that start with System. *. Dlls are essentially the .Net framework.
The .exe files that you see in this folder are utilities for developers as well as compilers. You mentioned C #. Locate the csc.exe file. This is your C # compiler.
Building a program is very simple. Add the following code to the hello.cs file.
using System; class Program { static void Main(string[] args) { Console.WriteLine("hello world"); } }
Then at the command prompt, type type> csc hello.cs
This will create a .exe file for you. Run it and it will obviously spit out “hello world”.
A line that says Console.WriteLine () calls in the Framework. The console is an object that lives in the System namespace, and WriteLine () is a static method.
This is the disassembled code for this Console.WriteLine () method:
[HostProtection(SecurityAction.LinkDemand, UI=true)] public static void WriteLine(string value) { Out.WriteLine(value); }
When people say things like “Should I use PHP or .Net?”, Or “Should I use Python or .Net”, you start to see how to say it wrong. They obviously compare the language with the Framework. C # is a language, and it is just one of many languages that you can use to write code on top of the .Net platform. The same Console.WriteLine () method can be called from C #, VB.Net, Pascal, C ++, Ruby, Python, F # and any other language that was created to work on top of the .NET platform.
I hope this helps.
-Keith