Sei sulla pagina 1di 7

Chapter 2

Building C# Applications

Anuradha.S.G Lecturer Department of CSE ,RYMEC.

Objectives
Command Line Compilation

Visual Studio .NET IDE


Referencing External Assemblies Demo Multi Language

Command Line Compilation


1.Role of Command Line Compiler(CSC.exe) .NET Assemblies can be created using the C# command-line compiler, CSC.exe(C-Sharp Compiler) CSC.exe is included with the .NET framework 2.0 SDK

Command Line Compilation


2.Configuration for CSC Right click the My Computer Properties Advanced Environment variables Double Click Path

Add the path where csc.exe is loaded C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 Now check out full set of command line options using help flag.
CSC help CSC -? or or CSC /help CSC /?
4

Command Line Compilation


Now check out full set of command line options using help flag. CSC help or CSC /help CSC -? or CSC /?

DEMO

Command Line Compilation


3.Building C# Applications using CSC.exe Programming Exercises
Level-1 1. A Simple C# Application Program. 2. A Program using Namespaces and Comments- single line and multi line comments. 3. A program returning a value from Main. 4. A program using Aliases for namespace classes. 5. A program passing string objects to WriteLine method. 6. A program using Command line arguments as input Level-2 1. 2. 3. 4. Main with a class Providing interactive input Using mathematical functions Using multiple main methods
6

Command Line Compilation

Potrebbero piacerti anche