Home > Store > Programming

larger cover

Add To My Wish List

Sams Teach Yourself C# in 21 Days

  • By Bradley L. Jones
  • Published Oct 19, 2001 by Sams. Part of the Sams Teach Yourself series.
    • Copyright 2002
    • Dimensions: 7-3/8" x 9-1/8"
    • Pages: 784
    • Edition: 1st
    • Book
    • ISBN-10: 0-672-32071-1
    • ISBN-13: 978-0-672-32071-2

Register your product to gain access to bonus material or receive a coupon.

  • Description
  • Downloads
  • Reviews
  • Sample Content

Product Author Bios

Bradley L. Jones is the site manager for a number of high-profile developer sites¿including CodeGuru.com, Developer.com, and Javascripts.com¿and an executive editor of internet.com's EarthWeb channel. Bradley has been working with C# longer than most developers, because he was invited to Microsoft prior to the official beta release. Bradley's background includes experience developing in C, C++, PowerBuilder, SQL Server, and numerous other tools and technologies. Additionally, he is an internationally best-selling author who wrote the original 21 Days book: Sams Teach Yourself C in 21 Days.

This book will take you, step by step, through learning C#, the computer industry's newest and most productive language. This complete guide covers topics from basic program construction to intermediate level application engineering. Following "21 days" formula, this book is a three week intensive course for the beginning programmer who wishes to get started with this exiting new coding standard. The comprehensive lesson plan will enable the reader to understand, design and build applications that are compatible with the new Microsoft .net framework.

Downloads


Source code from the book - 286 kb -- code.zip

Customer Reviews

14 of 14 people found the following review helpful
3.0 out of 5 stars Hits The Major Topics, February 28, 2003
By 
Jeff Damukaitis (McKinney, TX USA) - See all my reviews
This review is from: Sams Teach Yourself C# in 21 Days (Paperback)
I have thoroughly enjoyed the book and its ability to bring one up to speed with C#. He covers some very basic concepts such as structures, classes, indexers, and advanced topics such as delegates. All the constructs that one needs in order to put the language to work are detailed.

If you are looking for a quick, down and dirty book to jump start your knowledge of the language I would rate the book 5 stars.

One of the biggest challenges with OO languages is not using a procedural style when writing code. The author no doubt has a handle on the C# language. But I don't think he has a handle on OO. As the author mentions, everything in C# is class. With this in mind, I would expect to see good class design throughout the book.

My criticism, which I hope is taken with a grain of salt, is that the examples which wrap up a week's lesson are too procedural. They are spaghetti code that I personally would re-factor before publishing. There is a Main method that is hundreds of... Read more

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


21 of 23 people found the following review helpful
5.0 out of 5 stars A Great Introduction To C#!, November 9, 2001
By 
This review is from: Sams Teach Yourself C# in 21 Days (Paperback)
Focus of this book is on the language itself - It doesn't get side-tracked talking about Visual Studio and .NET in general, like many C# books. It is written in a clear, friendly tone and the concepts and definitions are easy to understand. The organization is also well thought-out. Like all 21 Days books, it is divided into 3 weeks of 7 days (chapters) each. In this book, Week 1 covers language basics, like using the compiler, variables, operators, control statements and an introduction to classes and methods. Week 2 goes into more intermediate language topics like enumerators, arrays, exception handling, inheritance, interfaces and delegates. Finally, Week 3 introduces a some advanced C# topics like operator overloading and reflection as well as demonstrating how C# fits with the rest of the .NET world, specifically, the .NET Framework, Windows Forms, Web Services and Web Forms.

One caveat: If you don't have a lot of programming experience, the first couple of days cover... Read more

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


12 of 12 people found the following review helpful
4.0 out of 5 stars All the C# that you need to get started, November 3, 2001
By 
Charles Ashbacher (Marion, Iowa United States) - See all my reviews
(TOP 500 REVIEWER)    (VINE VOICE)    (HALL OF FAME REVIEWER)   
This review is from: Sams Teach Yourself C# in 21 Days (Paperback)
I have heard much about C# (pronounced C-sharp) over the last year, ranging from the bitter to the laudatory. In reading other books about the language, I was unable to formulate an opinion regarding the impact it will have. Well, after reading this book, it is clear that C# will have a major impact, and in this restricted job market, it is an excellent career move to learn how to use it. For years, I have heard C++ referred to as a "safer C", which is of course nonsense. In my experience, the sheer size of C++ makes it more, not less dangerous than C. However, in my opinion, there is no question that C# is a safer C. It retains some of the more attractive features of C++, such as operator overloading, yet the more dangerous concepts such as memory management and multiple inheritance are eliminated.
Before reading this book, I had some experience with C# and was looking for a text to use in the corporate training classes that I am creating. My search has ended. The lessons... Read more
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


Share your thoughts with other customers:
 See all 17 customer reviews...

Online Sample Chapter

Storing Information with Variables in C#

Table of Contents

(NOTE: Each chapter concludes with a Summary, Q&A, and Workshop.)

Introduction.

WEEK 1. AT A GLANCE.

Day 1. Getting Started with C#.

What Is C#? Why C#? C# Versus Other Programming Languages. Preparing to Program. The Program Development Cycle. Your First C# Program. Types of C# Programs.

Day 2. Understanding C# Programs.

C# Applications. Basic Parts of a C# Application. Structure of a C# Application. Analysis of Listing 2.1. Object-Oriented Programming (OOP). Displaying Basic Information.

Day 3. Storing Information with Variables.

Variables. Using Variables. Understanding Your Computer's Memory. C# Data Types. Numeric Variable Types. Literals Versus Variables. Constants. Reference Types.

Day 4. Working with Operators.

Types of Operators. Punctuators. The Basic Assignment Operator. Mathematical/Arithmetic Operators. Relational Operators. Logical Bitwise Operators. Type Operators. The sizeof Operator. The Conditional Operator. Understanding Operator Precedence. Converting Data Types. Understanding Operator Promotion. For Those Brave Enough.

Day 5. Control Statements.

Controlling Program Flow. Using Selection Statements. Using Iteration Statements. Using goto. Nesting Flow.

Day 6. Classes.

Object-Oriented Programming Revisited. Defining a Class. Class Declarations. Data Members, aka Fields. Static Variables. The Application Class. Properties. A First Look at Namespaces.

Day 7. Class Methods and Member Functions.

Getting Started with Methods. Using Methods. Program Flow with Methods. Format of a Method. Passing Values to Methods. Types of Class methods.

Week 1. In Review.

The WR01.cs Program

WEEK 2. AT A GLANCE.

Day 8. Advanced Data Storage: Structures, Enumerators, and Arrays.

Structures. Enumerators. Using Arrays to Store Data.

Day 9. Advanced Method Access.

Overloading Methods. Using a Variable Number of Parameters. Scope. Classes with No Objects. Namespaces Revisited.

Day 10. Handling Exceptions.

The Concept of Handling Problems. Exception Handling. Adding Finality with finally. Common Exceptions. Defining Your Own Exception Classes. Throwing Your Own Exceptions. checked Versus unchecked Statements.

Day 11. Inheritance.

The Basics of Inheritance. Polymorphism and Inherited Classes. Virtual Methods. Working with Abstract Classes. Sealing Classes. The Ultimate Base Class: Object. Using the is and as Keywords with Classes—Class Conversions. Arrays of Different Object Types.

Day 12. Better Input and Output.

Understanding Console Input and Output. Formatting Information. Working Closer with Strings. Getting Information from the Console.

Day 13. Interfaces.

Interfaces—A First Look. Defining Interfaces. Using Multiple Interfaces. Explicit Interface Members. Deriving New Interfaces from Existing Ones. Hiding Interface Members.

Day 14. Indexers, Delegates, and Events.

Using an Indexer. Exploring Delegates. Working with Events. Creating Events.

Week 2. In Review.

Enumerations for the Cards. A card Type. A deck Class. The Card Game. Looking at the Entire Deck.

WEEK 3. AT A GLANCE.

Day 15. Using the .NET Bases Classes.

Classes in the .NET Framework. Working with a Timer. Getting Directory and System Environment Information. Working with Math Routines. Working with Files. Working with Data Files.

Day 16. Creating Windows Forms.

Working with Windows and Forms. Creating Windows Forms. Customizing a Form's Look and Feel. Adding Controls to a Form.

Day 17. Creating Windows Applications.

Working with Radio Buttons. Working with List Boxes. Adding Menus to Your Forms. Displaying Pop-Up Dialogs and Forms.

Day 18. Web Development.

Creating Web Applications. The Concept of a Component. Web Services. Creating Regular Web Applications.

Day 19. Two D's in C#—Directives and Debugging.

What Is Debugging? Types of Errors. Finding Errors. Code Walkthroughs: Tracing Code. Preprocessor Directives. Using Debuggers.

Day 20. Operator Overloading.

Overloading Functions Revisited. Operator Overloading.

Day 21. A Day for Reflection and Attributes.

Reflection. Attributes. Congratulations!

Week 3. In Review.

Apply What You Know. Show What You Know.

APPENDIXES.

Appendix A: Answers.

Appendix B: C# Keywords.

abstract. as. base. bool. break. byte. case. catch. char. checked. class. const. continue. decimal. default. delegate. do. double. else. enum. event. explicit. extern. false. finally. fixed. float. for. foreach. get. goto. if. implicit. in. int. interface. internal. is. lock. long. namespace. new. null. object. operator. out. override. params. private. protected. public. readonly. ref. return. sbyte. sealed. set. short. sizeof. stackalloc. static. string. struct. switch. this. throw. true. try. typeof. uint. ulong. unchecked. unsafe. ushort. using. value. virtual. void. while.

Appendix C. C# Command-Line Compiler Flags.

Output. Input. Resource. Code Generation. Errors and Warnings. Programming Language. Miscellaneous. Advanced.

Appendix D. Understanding Different Number Systems.

The Decimal Number System. The Binary System. The Hexadecimal System.

Index.

 
Buy

Book  $39.99  $31.99

Usually ships in 24 hours.

This book includes free shipping!

Purchase Reward: One Month Free Subscription
By completing any purchase on InformIT, you become eligible for an unlimited access one-month subscription to Safari Books Online.

Get access to thousands of books and training videos about technology, professional development and digital media from more than 40 leading publishers, including Addison-Wesley, Prentice Hall, Cisco Press, IBM Press, O'Reilly Media, Wrox, Apress, and many more. If you continue your subscription after your 30-day trial, you can receive 30% off a monthly subscription to the Safari Library for up to 12 months. That's a total savings of $199.