Recommended C# books for beginners?

J

John Salerno

Hi all. I was hoping some of you could recommend a book or two that
would help me get started with the basics of C#. I have a slight
knowledge of programming, but basically I want to start out like I know
nothing, so I don't skip anything.

I considered Microsoft Visual C# .NET Step by Step 2003 by Sharp/Jagger,
but then I read a few reviews and it doesn't sound so good. I have XP
Home, and I plan to buy only Visual C#, not Visual Studio, and I heard a
lot, if not all, the examples requires Studio.

I found this book at Thomson Learning (www.course.com):Microsoft Visual
C# .NET Programming: From Problem Analysis to Program Design by Doyle,
and it seems like a good introduction (but then again, so did the one
above). It also has the option of purchasing C# Standard with it.

Later I might read Beginning C# Game Programming by Penton, since game
development interests me very much.

But basically I'd like to start out with a general book that explains
all the basics of C# and that will allow me to start developing
applications (not necessarily web-based, or games, just basic apps).

Thanks!
 
M

MS News \(taruntius\)

If you go to www.microsoft.com and browse to the Visual Studio homepage, you
can find a table that lists the specific differences in functionality
between the different Visual Studio packages.
 
D

Doug Arnott

John said:
Hi all. I was hoping some of you could recommend a book or two that
would help me get started with the basics of C#.

I am learning C#. The C# books that I have so far are as follows:

1. "Programming In The Key Of C#, A Primer For Aspiring
Programmers" by Charles Petzold
2. "Programming Microsoft Windows With C#" by Charles Petzold
3. "Inside C#" by Tom Archer

Book #1 is for the beginner. Although I have programmed in Smalltalk,
Java and C++, I enjoyed reading the book because each software lan-
guage has its own nuances, and I want those identified and explained
to me from the start. Sure, I fell asleep sometimes when I covered
material similar to Java and C++, but the explanations about the way
things happen with the stack and the heap kept me attentive.

When I was learning to program C++ on the Win32 API, I used "Program-
ming Windows 95" by Charles Petzold. This book was invaluable. Thus,
the same goes for book #2. So far, I have only scratched the surface
of knowledge in book #2 with programming Forms.

For me, book #3 is for when I have advanced questions, like setting
up a conditional attribute for debugging. I will read it thorougly
after I have finished with the first two books.
I have a slight
knowledge of programming, but basically I want to start out like I know
nothing, so I don't skip anything.

With this statement, buy book #1 above.
I considered Microsoft Visual C# .NET Step by Step 2003 by Sharp/Jagger,
but then I read a few reviews and it doesn't sound so good. I have XP
Home, and I plan to buy only Visual C#, not Visual Studio, and I heard a
lot, if not all, the examples requires Studio.

Hmm. I started programming back in the days of punch cards. The only
software language IDE that I loved was Smalltalk, otherwise, I revert
back to being a command line programmer. The IDEs for Java and C++
were too much overhead for me. After learning C# from the command line,
I am going to have to get Visual C# .NET 2005 to try it to see if I
like it or not.

My advice to any C# beginner is to write at least one or two small con-
sole or GUI programs using the command line before advancing to the
Visual C# IDE.
I found this book at Thomson Learning (www.course.com):Microsoft Visual
C# .NET Programming: From Problem Analysis to Program Design by Doyle,
and it seems like a good introduction (but then again, so did the one
above). It also has the option of purchasing C# Standard with it.

Later I might read Beginning C# Game Programming by Penton, since game
development interests me very much.

I have "Managed DirectX 9 Kick Start: Graphics and Game Programming"
by Tom Miller in the mail to me. I bought this book based on recommen-
dations.
But basically I'd like to start out with a general book that explains
all the basics of C# and that will allow me to start developing
applications (not necessarily web-based, or games, just basic apps).

I do not think that you will find one book that will fit your needs.
You will need, two or three, maybe more. As a computer book junkie
myself, I am just trying to get the ones that are the right fit for
me.

Good luck,
Doug
 
J

John Salerno

Doug said:
I do not think that you will find one book that will fit your needs.
You will need, two or three, maybe more. As a computer book junkie
myself, I am just trying to get the ones that are the right fit for
me.

Thank you very much for the recommendations. Just one question: when you
say start out using the command line to program, what exactly do you
mean? Is that just downloading the free software, before I actually buy
the full version?
 
S

Sylvain Lafontaine

Yes, you will lose the capabilities of distributing your applications to or
accessing other machines; however, for a learning purposes, it will be
perfect.

Don't forget that they are still Beta versions and that if you want to
install one of the RTM (Release to Market) editions later, it is possible
that you will have the obligation of restoring your OS from a backup or to
reinstall it completely. Beta versions are beta versions.

S. L.
 
J

John Salerno

Sylvain said:
Don't forget that they are still Beta versions and that if you want to
install one of the RTM (Release to Market) editions later, it is possible
that you will have the obligation of restoring your OS from a backup or to
reinstall it completely. Beta versions are beta versions.

I've never heard of that before. You mean I can't just uninstall it?
 
D

Doug Arnott

John said:
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/...e3-f589-4842-8157-034d1e7cf3a3&displaylang=en

Microsoft .NET Framework SDK Version 1.1
http://www.microsoft.com/downloads/...a6-3647-4070-9f41-a333c6b9181d&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.cs
2. HelloWorldWin.cs
3. setup.bat
4. compc.bat
5. compw.bat

The HelloWorldCon.cs file contains the following:
class HelloWorldCon
{
static void Main()
{
System.Console.WriteLine("Hello, World");
}
}

The HelloWorldWin.cs file contains the following:
class HelloWorldWin
{
public static void Main()
{
System.Windows.Forms.MessageBox.Show("Hello, World");
}
}

The setup.bat file contains the following line:
PATH=%PATH%;C:\WINDOWS\Microsoft.NET\Framework\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.cs

The compw.bat file contains the following line:
csc /target:winexe HelloWorldWin.cs

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.exe
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.cs, 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.exe 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
 
J

John Salerno

Doug said:
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.

Wow, thanks again. I don't have too much experience with the console,
but I see what you mean now. Basically you write the files in an editor,
then run them from the prompt? I use TextPad for a little video game
scripting, but I just downloaded UltraEdit (it looks like it has a ton
of features).

As far as the .NET Framework, I recently downloaded something from the
Windows Update website called Microsoft .NET Framework version 1.1 (with
two security updates), but it didn't mention anything about SDK. Is what
I downloaded just the basic .NET 'system', and I still need the second
thing you mentioned?

I think I will wait for C# 2005, so until then this method might give me
something to work with, if I don't get the 2003 IDE. I suppose using
something like UltraEdit is the same as using the IDE, basically?
 
S

Sylvain Lafontaine

Uninstalling Beta versions are often very troublesome. Myself, I've be
unable to remove completely a previous version of Whidbey that I had
installed.

I don't know about the latest versions of Whidbey or of the Express
versions.

S. L.
 
J

John Salerno

Doug said:
1. "Programming In The Key Of C#, A Primer For Aspiring
Programmers" by Charles Petzold

I did some reading about that book, and it seems perfect for what I
need. But I wonder, do you think there will be an updated version for C#
2005? Or should I not worry about that?
 
J

Jeffrey Palermo

I would recommend starting with the .Net SDK documentation, and start
from the beginning. It's free, and it will give you all the
information you need to get started. This documentation is first rate.
I was used to crappy Windows Help documentation, so I was really
impressed when this turned out to be great technical writing.


Best regards,
Jeffrey Palermo
Blog: http://www.jeffreypalermo.com
 
D

Doug Arnott

John said:
I did some reading about that book, and it seems perfect for what I
need. But I wonder, do you think there will be an updated version for C#
2005? Or should I not worry about that?

I do not know the changes between version 1.x and 2.x. I cannot
think that there are any changes with the basic aspects of the C#
language, thus, the book of "Programming In The Key Of C#, A Primer
For Aspiring Programmers" will be applicable for version 2.x and
beyond.

Doug
 
D

Doug Arnott

John said:
Wow, thanks again. I don't have too much experience with the console,
but I see what you mean now. Basically you write the files in an editor,
then run them from the prompt? I use TextPad for a little video game
scripting, but I just downloaded UltraEdit (it looks like it has a ton
of features).

As far as the .NET Framework, I recently downloaded something from the
Windows Update website called Microsoft .NET Framework version 1.1 (with
two security updates), but it didn't mention anything about SDK. Is what
I downloaded just the basic .NET 'system', and I still need the second
thing you mentioned?

Without a link to look at the download page, I have no idea what you
downloaded. However, the links to the two download pages that I sup-
plied are for the redistributable and the SDK. The Version 1.1 redis-
tributable has Windows 98, for example, listed as one of the supported
Windows products. However, the Version 1.1 SDK does not list Windows
98. Thus, one cannot develop C# applications on Windows 98 using the
SDK, but one can run C# applications on Windows 98 with the redistri-
butable installed. (I have not tried this to confirm, but that's my
conclusion from reading things.) From the outside looking in, the
strategy from Microsoft is to move developers off of Windows 98 and
onto Windows XP.
I think I will wait for C# 2005, so until then this method might give me
something to work with, if I don't get the 2003 IDE. I suppose using
something like UltraEdit is the same as using the IDE, basically?

Experiment and learn, then you can answer these type of questions
as the answers are often subjective.

Doug
 
J

John Salerno

Doug said:
Without a link to look at the download page, I have no idea what you
downloaded.

This is the description of what I downloaded:

Microsoft .NET Framework version 1.1
The .NET Framework is a component of the Windows operating system. For
developers, the .NET Framework makes it easy to rapidly create powerful
software that maximizes performance, scalability, opportunities for
integration, reliability, security, and the end-user experience, while
minimizing the costs of deployment and management. After you install
this item, you may have to restart your computer.


I also downloaded Service Pack 1 for the Framework, and a hotfix to the
Service Pack. I'm guessing this is the same as the redistributable, but
I want to make sure before I download the SDK (if this isn't also the
SDK as well).
 
A

ahmed ans

i think that microsoft visual c#.net "step by step" by john shap,jon
jagger is good for the beginners
 
Z

Zach

Fortunately there are several good books.
A "good book" might not be good for everyone.
Best to have a good look at the good book first.
Most books, even good books, on c/c++/c# are
commercial products, not didactical methods,
and that is very unfortunate.
 
C

Chris

Hi,


Before buying a book, have a look at
http://lab.msdn.microsoft.com/express/beginner/

It's a real nice set of free videos on beginning C#.NET 2005
programming by Bob Tabor. You can watch how Bob uses Visual C#.NET
2005 Express to teach about the very basic things like loops, arrays,
the IDE and so on. He even gives an introduction to OOP. Very well
done!

Books: take a look at "C# complete" (from Sybex - only 25 $) as a
starter, also check "Programming C#" by Jesse Liberty, and dig into
OOP with "C# Objects" (Apress).



Happy coding,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top