Application.Run( )
on that object.
Compiling the Windows Skeleton
You can compile a Windows program using either the command-line compiler or Visual
Studio. For the very short programs shown in this chapter, the command-line compiler is
the easiest way; but for real applications, you will probably want to use the IDE. (Also, as
explained at the start of this chapter, you will probably want to use the design tools provided
by Visual Studio, but that is not the approach described here.) Each way is shown here.
Compiling from the Command Line
Assuming that you call the skeleton
WinSkel.cs
, then to compile the skeleton from the
command line, use this command:
csc /t:winexe WinSkel.cs
The
/t:winexe
switch tells the compiler to create a Windows application rather than a
console program. To run the program, simply enter
WinSkel
at the command line.
www.freepdf-books.com
852
P a r t I I :
E x p l o r i n g t h e C # L i b r a r y
Do'stlaringiz bilan baham: |