Microsoft Visual C# .NET Step by Step 2003 View Larger Image | John Sharp, Jon Jagger Microsoft Press, Paperback, Bk&CD edition, Published March 2003, 635 pages, ISBN 0735619093 | List Price: $39.99 Our Price: $25.50 You Save: $14.49 (36% Off)
| | | Availability: Out-Of-Stock |
Customer Reviews: 3 Average Customer Rating:      Write a Review and tell the world about this title! People who purchase this book frequently purchase: - Microsoft Visual Basic .NET Step by Step: Version 2003; Michael Halvorson, $25.50, 36% Off!
- Effective C#: 50 Specific Ways to Improve Your C#; Bill Wagner, $31.50, 37% Off!
- Professional C#, 3rd Edition; Simon Robinson, et al, $31.50, 37% Off!
- Essential ASP.NET with Examples in C#; Fritz Onion, $31.50, 37% Off!
Books on similar topics, in best-seller order:Books from the same publisher, in best-seller order:
Teach yourself Visual C# .NET version 2003-and begin developing Microsoft .NET-connected
applications-one step at a time. This practical, hands-on tutorial expertly guides
you through the fundamentals-from learning Visual C# syntax to writing and running
your first components, Web services, and applications. Work at your own pace through
easy-to-follow lessons and hands-on exercises to teach yourself essential techniques.
And stay ahead of the curve by working with real-world examples and best practices
for Visual C# .NET version 2003 development. Topics include object-oriented techniques,
such as inheritance and encapsulation; exception-handling; resource management
and the garbage collector; building components; creating GUI components and user
controls; manipulating XML documents; Microsoft ADO.NET; Web Forms; Microsoft
ASP.NET controls; integration with Microsoft Windows® .NET Server 2003; testing;
deployment; and more.
Key Book Benefits:
-
Teach yourself the fundamentals-from learning C# syntax to running your first
.NET-ready program.
-
Step-by-step learning method allows you to work at your own pace through exactly
the lessons and hands-on exercises you need.
-
Features real-world programming scenarios to demonstrate concepts and speed
comprehension.
-
Provides heads-up programming tips for Microsoft Visual Basic® and Java
programmers who are learning C#.
-
Includes all practice files and sample projects, plus a complete eBook.
Table of Contents
Acknowledgments xv
Introduction xvii
PART 1 INTRODUCING MICROSOFT VISUAL C# AND VISUAL STUDIO .NET
CHAPTER 1 Welcome to C# 3
Beginning Programming with the Visual Studio .NET Environment 4
Writing Your First Program 7
Using Namespaces 11
Creating Documentation Using XML and Comments 14
Creating a Windows Forms Application 18
CHAPTER 2 Working with Variables, Operators, and Expressions 27
Understanding Statements 27
Using Identifiers 28
Identifying Keywords 28
Using Variables 29
Naming Variables 29
Declaring Variables 30
Working with Primitive Data Types 31
Displaying Primitive Data Type Values 32
Setting Arithmetic Operators 35
Determining an Operators Values 35
Examining Arithmetic Operators 36
Controlling Precedence 39
Using Associativity to Evaluate Expressions 40
Incrementing and Decrementing Variables 40
CHAPTER 3 Writing Methods and Applying Scope 43
Declaring Methods 43
Specifying the Method Declaration Syntax 44
Writing return Statements 45
Calling Methods 47
Specifying the Method Call Syntax 47
Understanding Scope 48
Creating Local Scope with a Method 49
Creating Class Scope with a Class 49
Overloading Identifiers 50
Writing and Calling Methods 51
CHAPTER 4 Using Decision Statements 59
Declaring bool Variables 59
Using Boolean Operators 60
Understanding Equality and Relational Operators 60
Understanding Logical Operators 61
Summarizing Operator Precedence and Associativity 62
Executing if Statements 62
Understanding if Statement Syntax 63
Using Blocks to Group Statements 64
Cascading if Statements 64
Using switch Statements 67
Understanding switch Statement Syntax 68
Following the switch Statement Rules 69
CHAPTER 5 Using Iteration Statements 73
Using Compound Assignment Operators 73
Writing while Statements 75
Writing for Statements 76
Understanding for Statement Scope 77
Writing do Statements 77
CHAPTER 6 Managing Errors and Exceptions 93
Coping with Errors 93
Trying Code and Catching Exceptions 94
Using Multiple catch Handlers 95
Writing a General catch Handler 96
Using Checked and Unchecked Integer Arithmetic 100
Writing checked Statements 100
Writing Checked Expressions 101
Throwing Exceptions 104
Writing a finally Block 109
PART 2 UNDERSTANDING THE C# LANGUAGE
CHAPTER 7 Creating and Managing Classes and Objects 115
What Is Classification? 115
What Is Encapsulation? 116
Controlling Accessibility 117
Working with Constructors and the new Keyword 119
Overloading Constructors 121
Understanding static Methods and Data 128
Creating a Shared Field 129
Creating a static Field with the const Keyword 130
CHAPTER 8 Understanding Values and References 135
Copying int Variables and Classes 135
Using ref and out Parameters 139
Creating ref Parameters 140
Creating out Parameters 141
What Are the Stack and the Heap? 143
Using the Stack and the Heap 143
What Is System.Object? 144
Boxing 146
Unboxing 146
Pointers and Unsafe Code 148
CHAPTER 9 Creating Value Types with Enumerations and Structs 153
Working with Enumerations 153
Declaring an Enumeration Type 154
Choosing Enumeration Literal Values 154
Choosing an Enumerations Underlying Type 154
Using an Enumeration 155
Working with Struct Types 157
Declaring Struct Types 158
Understanding Struct and Class Differences 158
Declaring Struct Variables 160
Understanding Struct Definite Assignment 161
Calling Struct Constructors 162
Copying Struct Variables 163
Understanding Keyword-Type Equivalences 164
CHAPTER 10 Using Arrays and Collections 171
What Is an Array? 171
Declaring Array Variables 171
Creating Array Instances 172
Initializing Array Variables 173
Accessing Individual Array Elements 174
Iterating Through an Array 175
Copying Arrays 176
Using the System.Array Class 178
What Are Collection Classes? 179
ArrayList 180
Queue 182
Stack 183
SortedList 184
Comparing Arrays and Collections 186
Using Collection Classes to Play Cards 186
CHAPTER 11 Understanding Parameter Arrays 193
Creating Overloaded Methods 193
Using Array Arguments 194
Declaring params Arrays 195
Using params object[ ] 198
Using params Arrays 200
Using the Main Method 204
CHAPTER 12 Working with Inheritance 207
What Is Inheritance? 207
Understanding Core Syntax 208
Base Classes and Derived Classes 208
Calling Base Class Constructors 209
new Methods 210
virtual Methods 211
override Methods 212
protected Access 213
Creating Interfaces 214
Syntax 215
Restrictions 215
Implementing an Interface 216
Abstract Classes 217
Sealed Classes 220
Sealed Methods 220
Extending an Inheritance Hierarchy 220
Working with Multiple Interfaces 226
Syntax 226
Explicit Interface Implementation 226
Summarizing Keyword Combinations 228
CHAPTER 13 Using Garbage Collection and Resource Management 231
Garbage Collection 231
Comparing Values and Objects 231
The Life and Times of an Object 232
Writing Destructors 233
Why Use the Garbage Collector? 234
How Does the Garbage Collector Run? 235
Recommendations 236
Resource Management 236
The Disposal Method Pattern 236
Exception-Safe Disposal 237
The using Statement 238
Adapting to IDisposable 239
Calling a Disposal Method from a Destructor 240
Making Code Exception-Safe 242
PART 3 CREATING COMPONENTS
CHAPTER 14 Implementing Properties to Access Attributes 249
Comparing Fields and Methods 249
What Are Properties? 251
get Accessors 252
set Accessors 252
Read/Write Properties 253
Read-Only Properties 253
Write-Only Properties 254
Understanding the Property Restrictions 254
Using Static Properties 255
Declaring Interface Properties 257
Using Properties in a Windows Application 258
CHAPTER 15 Using Indexers 265
What Is an Indexer? 265
An Example That Doesnt Use Indexers 265
The Same Example Using Indexers 267
get Accessors 269
set Accessors 269
Read/Write Indexers 269
Read-Only Indexers 270
Write-Only Indexers 270
Comparing Indexers and Methods 271
Comparing Indexers and Arrays 271
Comparing Indexers and Properties 272
Interface Indexers 272
Using Indexers in a Windows Application 273
CHAPTER 16 Delegates and Events 281
Using Delegate Declarations and Instances 281
An Example That Doesnt Use a Delegate 281
The Same Example Using a Delegate 284
Declaring a Delegate 284
Calling a Delegate 285
Creating a Delegate Instance 286
Using Delegates 288
Enabling Notifications with Events 290
Declaring an Event 291
Subscribing to an Event 291
Unsubscribing from an Event 292
Calling an Event 292
Understanding GUI Events 293
Using Events 295
CHAPTER 17 Operator Overloading 301
Working with Operators 301
Understanding Operators 301
Implementing Operator Constraints 302
Overloaded Operators 303
Creating Symmetric Operators 304
Understanding Compound Assignment 306
Declaring Increment and Decrement Operators 307
Using Operator Pairs 308
Implementing an Operator 309
Declaring Conversion Operators 312
Providing Built-In Conversions 312
Declaring User-Defined Conversion Operators 312
Creating Symmetric Operators (Again) 313
Adding an Implicit Conversion Operator 314
PART 4 WORKING WITH WINDOWS APPLICATIONS
CHAPTER 18 Introducing Windows Forms 319
Creating Your Application 320
Creating a Windows Forms Application 320
What Are the Common Windows Forms Properties? 324
Changing Properties Programmatically 326
Adding Controls to the Form 327
Using Windows Forms Controls 327
Setting Control Properties 329
Changing Properties Dynamically 332
Publishing Events in Windows Forms 335
Processing Events in Windows Forms 335
CHAPTER 19 Working with Menus 341
Menu Guidelines and Style 341
Adding Menus and Processing Menu Events 342
Creating a Menu 342
Setting Menu Item Properties 344
Other Menu Item Properties 347
Menu Events 348
Pop-Up Menus 350
Creating Pop-Up Menus 350
CHAPTER 20 Performing Validation 357
Validating Data 357
The CausesValidation Property 358
Validation Events 358
An ExampleCustomer Maintenance 358
Performing Validation with a Sledge Hammer 359
Being Unobtrusive 363
Using an ErrorProvider Control 366
CHAPTER 21 Using Complex Controls 371
The Explorer Interface 371
Splitter Windows, Docking Controls, and Panels 373
Working with the Splitter and Docked Controls 373
Using a Panel 376
Docking the Controls 376
Controls for Navigating Data 377
Working with the TreeView Control 378
Using a ListView Control 386
CHAPTER 22 Using the MDI, Windows, and Dialog Boxes 397
What Is the Multiple Document Interface? 398
Building an MDI Application 398
Alternatives to MDI 404
Creating Dialog Boxes 405
Displaying Modal and Modeless Dialog Boxes 405
Using Common Dialog Controls 409
Using the SaveFileDialog Control 409
CHAPTER 23 Creating GUI Components 415
Working with User Controls 415
Building the Login User Control 416
Using the Login User Control 423
Specializing Controls Using Subclassing 426
Creating a ToggleButton Control 427
Using the ToggleButton Control 431
PART 5 MANAGING DATA
CHAPTER 24 Using a Database 437
Using ADO.NET Databases 437
Using the Northwind Traders Database 438
Accessing the Database 439
Using ADO.NET Programmatically 448
CHAPTER 25 Working with Data Binding and DataSets 459
Windows Forms Controls and Data Binding 460
Using Simple Data Binding 460
Using Complex Data Binding 464
Disconnected DataSets 468
Creating a Disconnected DataSet 468
Handling Updates with a Disconnected DataSet 472
CHAPTER 26 Handling XML 479
Why XML? 479
The Goals of XML 480
The Structure of XML 480
XML Schemas 481
XML as a Transport Format and Protocol 483
XML APIs and the .NET Framework 483
The Employee Timesheet System 484
Creating an XML Schema 484
Building the Timesheet Recording Application 490
Creating the Timesheet Analysis Application 494
PART 6 BUILDING WEB APPLICATIONS
CHAPTER 27 Introducing ASP.NET 501
Understanding the Internet as an Infrastructure 502
Understanding Web Server Requests and Responses 502
Managing State 503
Understanding ASP .NET 504
Creating Web Applications with ASP .NET 505
Building an ASP .NET Application 505
Understanding Server Controls 514
CHAPTER 28 Understanding Validation Controls 525
Comparing Server and Client Validations 525
Server Validation 526
Client Validation 526
Implementing Client Validation 527
CHAPTER 29 Accessing Data with Web Forms 535
Using the Web Forms DataGrid Control 535
Managing Security 536
Understanding Forms-Based Security 536
Implementing Forms-Based Security 537
Querying Data 541
Displaying Customer Information 542
Retrieving Data on Demand 546
Optimizing Data Access 548
Editing Data 550
Deleting Rows 550
Updating Rows 553
CHAPTER 30 Building ASP.NET Applications 559
Additional Features of the DataGrid Control 559
Sorting a DataGrid 560
Using Column Templates 563
Navigating Between Forms 568
Using Buttons and Hyperlinks 569
CHAPTER 31 Building an XML Web Service 579
What Is an XML Web Service? 579
The Role of SOAP 581
What Is the Web Services Description Language? 582
Building the ProductService Web Service 584
Creating the ProductService Web Service 584
Handling Complex Data 589
CHAPTER 32 Consuming a Web Service 597
Web Services, Clients, and Proxies 597
Talking SOAP: The Difficult Way 598
Talking SOAP: The Easy Way 598
Consuming the ProductService Web Service 599
Executing a Web Method Asynchronously 606
About the Author
John Sharp is a Principal Technologist at Content Master Ltd., a technical
authoring company in the United Kingdom. He researches and develops technical
content for technical training courses, seminars, and white papers. Throughout
his development career, John has been active in training, both in developing
and delivering courses. He currently trains full time, conducting courses on
subjects ranging from UNIX Systems Programming to SQL Server Administration
to Enterprise Java Development. He has used his experience to create a broad
range of training materials covering many subjects. John is deeply involved
with .NET development, writing courses, building tutorials, and delivering conference
presentations covering Visual C# .NET development and ASP.NET. He lives in Tetbury,
Gloucestershire, in the United Kingdom.
Jon Jagger is an independent software trainer, designer, and consultant
specializing in Visual C# .NET, C++, Java, C, OO, patterns, design, and general
programming. His work on this book also was done through Content Master Ltd.
Jon is a U.K. C++ standards panel member and a regular contributor to the ACCU
Overload journal. His interests include training excellence, design, simplicity,
problem solving, and Monty Python (which he says is required knowledge for all
software developers). Jon, his wife, Natalie, and their three small children
(Ellie, Penny, and Patrick) live in a delightful 104-year-old house overlooking
a seven-acre field of barley in a village called Trull (population 300).
Customer Reviews
Customer Reviews: 3 Average Customer Rating:      Jan 24, 2005     Ricardo Birmele from Pacific Northwest Where's the Deploy to Web????? This is a pretty good book for the first time C# developer. It gives you a good discussion of the underlying "whys?" of the basics. I think they may have forgotten the last chapter though. As you can see from the Table of Contents on this site, the book ends with a section on how to write C# web apps. But there is no -- zero -- nada -- mention about how actually to deploy those web apps they taught you to write. And that is an unforgivable omission, IMO.
Mar 19, 2004     Adam from Pennsylvania, United States Similar to a C# in 24-hours After pouring over C# books for a few weeks. This book was really what I need a review of the (VS2k3 IDE), lexical review of C#, and some examples to get me started with the (.Net)framework. This book does all that. Its a really easy read. I think the portions that deal with the IDE are fantastic.
From a constructive stand point, I don't like the layout of the material. I think its a good first draft, but some user feedback could make for a better organized 2nd and 3rd product. For an experience developer, there isn't a problem, but for a novice you're going to have a tough time. I hate the fact there are no chapter end questions to test your knowledge (kinda like the Llama book - Programming Perl). I think the portion on references is weak. Specifically the explenations of stack and heap. The step-by-step approach could do without the steps `start visual studio` and the like each time.
Aug 25, 2003     Slow changer from Louisville, KY Excellent introduction This book is great as a spring board! This book gives one the basis one needs to start working with the .net framework, in C#. The author does a superb job of explaining otherwise complex aspects of the language in clear, concise terms. I flew through the book and felt much more confident on the other end!
|