The C# compiler compiles source code, specified as a set of files with the .cs extension, into an assembly. An assembly is the unit of packaging and deployment in .Net, and it can be either an application or a library. A normal console or Windows application has a Main method and is an .exe. A library is a .dll, and is equivalent to an .exe without an entry point. Its purpose is to be called upon (referenced) by an application or by other libraries. The .Net Framework is a set of libraries. (Think of a library as a tool to be used in an application that provides a certain function or task for the program.)
The name of the C# compiler is csc.exe. You can either use an IDE such as Visual Studio.Net to call csc automatically, or compile manually from the command line. To compile manually, first save a program to a file such as MyProgram.cs, and then invoke csc (located under
csc /target:library MyProgram.cs
Try this one and find out how C# compiles in .Net.
No comments:
Post a Comment