Compile A C Application

Once you have created your C# source file, you can compile the file into an executable program that you can run. A compiler is a utility program that takes a source file — a readable text file — and converts it into a executable file — a binary file that the operating system of the computer knows how to run.

To compile the application, open the command prompt and go to the directory where the source file is located (for example: C:\Csharp). You can use the csc.exe command to invoke the C# compiler. To specify the source file that you want to compile, simply type a space and then the name of the file that you want to compile.

When this command is run, the source file is used by the C# compiler to create an executable program. If you created a console application, you can then run this executeable program by typing the name of the file. A console application is an executable program that can be run from the command line. The C# compiler has many options that you can specify when compiling an application.

COMPILE A C# APPLICATION

My Documents Online Services

Windows Update

m

Programs ►

Documents ►

éf

Settings ►

<s

Search ►

0

Help

Shut Down...

My Documents Online Services

Internet

Explorer

Setup MSN Internet Access

hasrati j^a ►

^ 12:00 PM 1

-D Click Start O Run.

■ The Run dialog box appears.

< Click OK to open the command line window.

Was this article helpful?

0 0

Post a comment