What do you mean by C# Compiler?

 Posted by Goud.Kv on 9/6/2014 | Category: C# Interview questions | Views: 2004 | Points: 40

It compiles the source code into an assembly. It is named as csc.exe.
We can call the C# compiler manually or by using Visual Studio's IDE (Integrated Development Environment).

To compile manually,
1. We have to save our program with extension of '.cs'

2. And then open the command prompt and invoke the compiler like
RootFolder(Windows Directory)\Microsoft .NET\Framework\
i.e, csc MyProgram.cs. It will generate MyProgram.exe.

3. Now to create a library, do like below,
csc /target:library MyProgram.cs.

Asked In: Spotted While Learning | Alert Moderator 

Comments or Responses

Login to post response