rent-now

Rent More, Save More! Use code: ECRENTAL

5% off 1 book, 7% off 2 books, 10% off 3+ books

9780735621299

Microsoft Visual C# 2005 Step by Step

by Sharp, John
  • ISBN13:

    9780735621299

  • ISBN10:

    0735621292

  • Edition: 3rd
  • Format: Paperback
  • Copyright: 2005-10-05
  • Publisher: Microsoft Press
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $39.99

Summary

Visual C#, a feature of Microsoft Visual Studio- 2005, is a modern programming language designed to deliver a productive environment for creating business frameworks and reusable object-oriented components. Now you can teach yourself essential techniques with Visual C#--and start building components and Microsoft Windows--based applications--one step at a time. With STEP BY STEP, you work at your own pace through hands-on, learn-by-doing exercises. Whether you're a beginning programmer or new to this particular language, you'll learn how, when, and why to use specific features of Visual C# 2005. Each chapter puts you to work, building your knowledge of core capabilities and guiding you as create your first C#-based applications for Windows, data management, and the Web.

Author Biography

John Sharp is a principal technologist at Content Master, part of CM Group Ltd, a technical authoring and consulting company. An expert on developing applications with the Microsoft .NET Framework and interoperability issues, John has produced numerous tutorials, white papers, and presentations on distributed systems, Web services, and the C# language. He is the author of several popular books, including Microsoft Windows Communication Foundation Step By Step and Microsoft Visual C# Step By Step.

Table of Contents

Acknowledgments xv
Introduction xvii
Finding Your Best Starting Point in This Book xvii
Minimum System Requirements xviii
Installing and Using the Practice Files xix
Installing the Practice Files xix
Configuring SQL Server Express Edition xx
Using the Practice Files xxi
Uninstalling the Practice Files xxv
Conventions and Features in This Book xxv
Conventions xxv
Other Features xxvi
Corrections, Comments, and Help xxvi
Visit the Microsoft Press Web Site xxvii
Part I Introducing Microsoft Visual C# and Microsoft Visual Studio 2005
Welcome to C#
3(20)
Beginning Programming with the Visual Studio 2005 Environment
3(4)
Writing Your First Program
7(5)
Using Namespaces
12(2)
Creating a Windows Forms Application
14(8)
Chapter 1 Quick Reference
22(1)
Working with Variables, Operators, and Expressions
23(18)
Understanding Statements
23(1)
Using Identifiers
24(1)
Identifying Keywords
24(1)
Using Variables
25(2)
Naming Variables
25(1)
Declaring Variables
26(1)
Working with Primitive Data Types
27(5)
Displaying Primitive Data Type Values
28(4)
Using Arithmetic Operators
32(5)
Determining an Operator's Values
32(1)
Examining Arithmetic Operators
33(3)
Controlling Precedence
36(1)
Using Associativity to Evaluate Expressions
37(1)
Incrementing and Decrementing Variables
37(3)
Chapter 2 Quick Reference
40(1)
Writing Methods and Applying Scope
41(18)
Declaring Methods
41(4)
Specifying the Method Declaration Syntax
41(2)
Writing return Statements
43(2)
Calling Methods
45(2)
Specifying the Method Call Syntax
45(2)
Applying Scope
47(2)
Defining Local Scope
47(1)
Defining Class Scope
48(1)
Overloading Methods
49(1)
Writing Methods
49(8)
Chapter 3 Quick Reference
57(2)
Using Decision Statements
59(16)
Declaring bool Variables
59(1)
Using Boolean Operators
60(3)
Understanding Equality and Relational Operators
60(1)
Understanding Conditional Logical Operators
61(1)
Summarizing Operator Precedence and Associativity
62(1)
Using if Statements to Make Decisions
63(6)
Understanding if Statement Syntax
63(1)
Using Blocks to Group Statements
64(1)
Cascading if Statements
65(4)
Using switch Statements
69(5)
Understanding switch Statement Syntax
69(1)
Following the switch Statement Rules
70(4)
Chapter 4 Quick Reference
74(1)
Using Compound Assignment and Iteration Statements
75(18)
Using Compound Assignment Operators
75(2)
Writing while Statements
77(4)
Writing for Statements
81(2)
Understanding for Statement Scope
82(1)
Writing do Statements
83(9)
Chapter 5 Quick Reference
92(1)
Managing Errors and Exceptions
93(20)
Coping with Errors
93(1)
Trying Code and Catching Exceptions
94(6)
Handling an Exception
95(1)
Unhandled Exceptions
95(1)
Using Multiple catch Handlers
96(1)
Catching Multiple Exceptions
97(3)
Using Checked and Unchecked Integer Arithmetic
100(3)
Writing checked Statements
101(1)
Writing Checked Expressions
102(1)
Throwing Exceptions
103(5)
Using a finally Block
108(2)
Chapter 6 Quick Reference
110(3)
Part II Understanding the C# Language
Creating and Managing Classes and Objects
113(20)
Understanding Classification
114(1)
The Purpose of Encapsulation
114(1)
Defining and Using a Class
114(2)
Controlling Accessibility
116(1)
Working with Constructors
117(8)
Overloading Constructors
118(7)
Understanding static Methods and Data
125(6)
Creating a Shared Field
126(1)
Creating a static Field with the const Keyword
127(4)
Chapter 7 Quick Reference
131(2)
Understanding Values and References
133(18)
Copying int Variables and Classes
133(5)
Using ref and out Parameters
138(4)
Creating ref Parameters
139(1)
Creating out Parameters
140(2)
How Computer Memory is Organized
142(2)
Using the Stack and the Heap
143(1)
The System.Object Class
144(1)
Boxing
144(1)
Unboxing
145(4)
Chapter 8 Quick Reference
149(2)
Creating Value Types with Enumerations and Structs
151(18)
Working with Enumerations
151(5)
Declaring an Enumeration Type
151(1)
Using an Enumeration
152(1)
Choosing Enumeration Literal Values
153(1)
Choosing an Enumeration's Underlying Type
154(2)
Working with Structure Types
156(11)
Declaring Structure Types
158(1)
Understanding Structure and Class Differences
159(1)
Declaring Structure Variables
160(1)
Understanding Structure Initialization
161(1)
Copying Structure Variables
162(5)
Chapter 9 Quick Reference
167(2)
Using Arrays and Collections
169(20)
What Is an Array?
169(6)
Declaring Array Variables
169(1)
Creating Array Instances
170(1)
Initializing Array Variables
171(1)
Accessing Individual Array Elements
172(1)
Iterating Through an Array
172(2)
Copying Arrays
174(1)
What Are Collection Classes?
175(13)
The ArrayList Class
176(2)
The Queue Class
178(1)
The Stack Class
179(1)
The Hashtable Class
180(1)
The SortedList Class
181(1)
Comparing Arrays and Collections
182(1)
Using Collection Classes to Play Cards
182(6)
Chapter 10 Quick Reference
188(1)
Understanding Parameter Arrays
189(10)
Using Array Arguments
190(8)
Declaring params Arrays
191(2)
Using params object [ ]
193(1)
Using params Arrays
194(4)
Chapter 11 Quick Reference
198(1)
Working with Inheritance
199(28)
What Is Inheritance?
199(1)
Using Inheritance
200(9)
Base Classes and Derived Classes
200(2)
Calling Base Class Constructors
202(1)
Assigning Classes
203(1)
new Methods
204(1)
Virtual Methods
205(2)
override Methods
207(1)
protected Access
208(1)
Creating Interfaces
209(4)
Interface Syntax
210(1)
Interface Restrictions
210(1)
Implementing an Interface
211(2)
Referencing a Class Through Its Interface
213(1)
Working with Multiple Interfaces
213(1)
Abstract Classes
213(3)
Sealed Classes
216(1)
Sealed Methods
216(1)
Extending an Inheritance Hierarchy
217(7)
Summarizing Keyword Combinations
224(1)
Chapter 12 Quick Reference
225(2)
Using Garbage Collection and Resource Management
227(16)
The Life and Times of an Object
227(5)
Writing Destructors
228(2)
Why Use the Garbage Collector?
230(1)
How Does the Garbage Collector Work?
231(1)
Recommendations
231(1)
Resource Management
232(4)
Disposal Methods
232(1)
Exception-Safe Disposal
232(1)
The using Statement
233(2)
Calling the Dispose Method from a Destructor
235(1)
Making Code Exception-Safe
236(3)
Chapter 13 Quick Reference
239(4)
Part III Creating Components
Implementing Properties to Access Attributes
243(16)
Comparing Fields and Methods
243(2)
What Are Properties?
245(4)
Using Properties
247(1)
Read-Only Properties
247(1)
Write-Only Properties
248(1)
Property Accessibility
248(1)
Understanding the Property Restrictions
249(2)
Declaring Interface Properties
251(5)
Using Properties in a Windows Application
252(4)
Chapter 14 Quick Reference
256(3)
Using Indexers
259(14)
What Is an Indexer?
259(7)
An Example That Doesn't Use Indexers
259(2)
The Same Example Using Indexers
261(2)
Understanding Indexer Accessors
263(1)
Comparing Indexers and Arrays
264(2)
Indexers in Interfaces
266(1)
Using Indexers in a Windows Application
267(5)
Chapter 15 Quick Reference
272(1)
Delegates and Events
273(20)
Declaring and Using Delegates
273(1)
The Automated Factory Scenario
274(4)
Implementing the Factory Without Using Delegates
274(1)
Implementing the Factory by Using a Delegate
275(3)
Using Delegates
278(2)
Anonymous Methods and Delegates
280(2)
Creating a Method Adapter
281(1)
Using an Anonymous Method as an Adapter
281(1)
Features of Anonymous Methods
282(1)
Enabling Notifications with Events
282(1)
Declaring an Event
282(1)
Subscribing to an Event
283(1)
Unsubscribing from an Event
284(1)
Raising an Event
284(1)
Understanding GUI Events
284(2)
Using Events
286(5)
Chapter 16 Quick Reference
291(2)
Introducing Generics
293(22)
The Problem with Objects
293(2)
The Generics Solution
295(3)
Generics vs. Generalized Classes
297(1)
Generics and Constraints
297(1)
Creating a Generic Class
298(11)
The Theory of Binary Trees
298(3)
Building a Binary Tree Class Using Generics
301(8)
Creating a Generic Method
309(4)
Defining a Generic Method to Build a Binary Tree
310(3)
Chapter 17 Quick Reference
313(2)
Enumerating Collections
315(14)
Enumerating the Elements in Collection
315(7)
Manually Implementing an Enumerator
316(4)
Implementing the Enumerable Interface
320(2)
Implementing an Enumerator by Using an Iterator
322(5)
A Simple Iterator
323(1)
Defining an Enumerator for the Tree<T> Class by Using an Iterator
324(3)
Chapter 18 Quick Reference
327(2)
Operator Overloading
329(20)
Understanding Operators
329(5)
Operator Constraints
330(1)
Overloaded Operators
330(2)
Creating Symmetric Operators
332(2)
Understanding Compound Assignment
334(1)
Declaring Increment and Decrement Operators
335(1)
Defining Operator Pairs
336(1)
Implementing an Operator
337(3)
Understanding Conversion Operators
340(5)
Providing Built-In Conversions
340(1)
Implementing User-Defined Conversion Operators
341(1)
Creating Symmetric Operators Revisited
342(1)
Adding an Implicit Conversion Operator
343(2)
Chapter 19 Quick Reference
345(4)
Part IV Working with Windows Applications
Introducing Windows Forms
349(20)
Creating Your Application
349(7)
Creating a Windows Forms Application
350(4)
What Are the Common Windows Forms Properties?
354(1)
Changing Properties Programmatically
355(1)
Adding Controls to the Form
356(8)
Using Windows Forms Controls
356(2)
Setting Control Properties
358(2)
Changing Properties Dynamically
360(4)
Publishing Events in Windows Forms
364(3)
Processing Events in Windows Forms
364(3)
Run the Application
367(1)
Chapter 20 Quick Reference
368(1)
Working with Menus and Dialog Boxes
369(24)
Menu Guidelines and Style
369(1)
Adding Menus and Processing Menu Events
370(9)
Creating a Menu
370(3)
Setting Menu Item Properties
373(3)
Other Menu Item Properties
376(1)
Menu Events
377(2)
Pop-Up Menus
379(5)
Creating Pop-Up Menus
379(5)
Using Common Dialog Controls
384(7)
Using the SaveFileDialog Control
385(2)
Using a Printer
387(4)
Chapter 21 Quick Reference
391(2)
Performing Validation
393(16)
Validating Data
393(1)
The CausesValidation Property
393(1)
Validation Events
394(1)
An Example---Customer Maintenance
394(11)
A First Attempt at Performing Validation
395(3)
Being Unobtrusive
398(1)
Using an ErrorProvider Control
399(3)
Adding a Status Bar
402(3)
Chapter 22 Quick Reference
405(4)
Part V Managing Data
Using a Database
409(22)
Using ADO.NET Databases
409(13)
The Northwind Traders Database
410(1)
Creating the Database
410(1)
Accessing the Database
411(11)
Using ADO.NET Programmatically
422(8)
Chapter 23 Quick Reference
430(1)
Working with Data Binding and DataSets
431(26)
Windows Forms Controls and Data Binding
432(9)
Defining a DataSet and Using Simple Data Binding
432(6)
Using Complex Data Binding
438(3)
Updating a Database Using a DataSet
441(12)
Managing Connections
441(1)
Handling Multi-User Updates
442(1)
Using a DataSet with a DataGridView Control
443(3)
Validating User Input in the DataGridView Control
446(3)
Performing Updates by Using a DataSet
449(4)
Chapter 24 Quick Reference
453(4)
Part VI Building Web Applications
Introducing ASP.NET
457(26)
Understanding the Internet as an Infrastructure
457(4)
Understanding Web Server Requests and Responses
458(1)
Managing State
458(1)
Understanding ASP.NET
459(2)
Creating Web Applications with ASP.NET
461(21)
Building an ASP.NET Application
461(10)
Understanding Server Controls
471(7)
Creating and Using a Theme
478(4)
Chapter 25 Quick Reference
482(1)
Understanding Web Forms Validation Controls
483(10)
Comparing Server and Client Validations
483(8)
Server Validation
483(1)
Client Validation
484(1)
Implementing Client Validation
485(6)
Chapter 26 Quick Reference
491(2)
Securing a Web Site and Accessing Data with Web Forms
493(20)
Using the Web Forms GridView Control
493(1)
Managing Security
494(7)
Understanding Forms-Based Security
494(1)
Implementing Forms-Based Security
495(6)
Querying Data
501(8)
Displaying Customer Information
501(3)
Displaying Data in Pages
504(2)
Optimizing Data Access
506(1)
Caching Data in a Data Source
506(3)
Editing Data
509(3)
Deleting Rows from a GridView Control
509(1)
Updating Rows in a GridView Control
510(2)
Chapter 27 Quick Reference
512(1)
Creating and Using a Web Service
513(26)
What Is a Web Service?
513(5)
The Role of SOAP
514(2)
What Is the Web Services Description Language?
516(2)
Building the ProductService Web Service
518(12)
Creating the ProductService Web Service
518(7)
Handling Complex Data
525(5)
Web Services, Clients, and Proxies
530(8)
Talking SOAP: The Difficult Way
530(1)
Talking SOAP: The Easy Way
531(1)
Consuming the ProductService Web Service
531(7)
Chapter 29 Quick Reference
538(1)
Index 539

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program