John Salerno wrote:
Thank you very much for the recommendations .
Your welcome.
Just one question: when you say start out using the command line to program,
what exactly do you mean?
Start -> Programs -> Accessories -> Command Prompt
Will open a Command Prompt window. Inside a Command Prompt window, one
enters commands on a line, thus, command line. The Command Prompt window
has its ancestry from the MS-DOS days. Some examples of commands are as
follows:
cd c:\ change the directory to the c: drive
mkdir csharp make (or create) the directory of csharp
rmdir csharp remove (or delete) the directory csharp
cd csharp change the directory down into csharp
cd c:\csharp change the directory into csharp on the c: drive
cd .. change the directory up one level
cd ..\.. change the directory up two levels
Is that just downloading the free software, before I actually buy the full
version?
I downloaded and installed the following two software components:
Microsoft .NET Framework Version 1.1 Redistributable Package
http://www.microsoft.com/downloads/d...displaylang=en
Microsoft .NET Framework SDK Version 1.1
http://www.microsoft.com/downloads/d...displaylang=en
From my understanding, the download of this SDK includes the full compiler,
that is, this compiler has the same functionality as in the Visual C# .NET
2003. Maybe, SDK Version 1.1 has a later subversion release than the one in
Visual C# .NET 2003. Maybe not. At this point, I am not concerned. I have
plenty to learn using SDK Version 1.1 before advancing to SDK Version 2.x
or Visual C# .NET 2005.
The Visual C# .NET 2003 is an Integrated Development Environment (IDE).
The reason for an IDE is to provide an integration of tools such as editor,
compiler and debugger. However, sometimes, an IDE can have an overload of
visual components or be too helpful to the point of being annoying or dis-
tracting. Plus, I like to know what all the files are and how they fit to-
gether, and often an IDE tries to remove the user from these files and
their locations.
As a command line programmer, I created the following files in my c:\csharp
directory using the Notepad text editor:
1. HelloWorldCon.c s
2. HelloWorldWin.c s
3. setup.bat
4. compc.bat
5. compw.bat
The HelloWorldCon.c s file contains the following:
class HelloWorldCon
{
static void Main()
{
System.Console. WriteLine("Hell o, World");
}
}
The HelloWorldWin.c s file contains the following:
class HelloWorldWin
{
public static void Main()
{
System.Windows. Forms.MessageBo x.Show("Hello, World");
}
}
The setup.bat file contains the following line:
PATH=%PATH%;C:\ WINDOWS\Microso ft.NET\Framewor k\v1.1.4322
NOTE: The setup.bat file above contains the path to the C# compiler
and may differ depending on installation and version.
The compc.bat file contains the following line:
csc /target:exe HelloWorldCon.c s
The compw.bat file contains the following line:
csc /target:winexe HelloWorldWin.c s
With the above files in the c:\csharp directory, execute the following
commands in the c:\csharp directory to compile and run the console
application:
setup
compc
HelloWorldCon
If everything is done correctly, "Hello, World" will appear in the
Command Prompt window following the running of the HelloWorldCon.e xe
file.
Note: Execution of the setup.bat file needs only be done once at the
start in a new Command Prompt window to establish the path to the com-
piler inside of the Command Prompt window.
For the window application in HelloWorldWin.c s, run the command of
compw on the command line, but, to run this Windows program, one needs
to double-click the icon of the HelloWorldWin.e xe file.
Some tricks in the Command Prompt window:
1. use the Up arrow key to scroll through previous commands.
2. use the Left arrow key to position the cursor on the text, and then
use the Insert key to toggle text insertion on and off.
The above should be enough for first time experimentation , and for you
to see how to develop console and window applications using the command
line. Now, you need a beginners book and more experimentation to learn.
Good luck,
Doug