did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780764558641

Professional C#, 2nd Edition

by ; ; ; ; ; ; ; ;
  • ISBN13:

    9780764558641

  • ISBN10:

    0764558641

  • Edition: 2nd
  • Format: eBook
  • Copyright: 2002-01-01
  • Publisher: WILEY
  • 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: $59.99
We're Sorry.
No Options Available at This Time.

Table of Contents

Introductionp. 1
The Significance of .NET and C#p. 1
So What is .NET?p. 3
Advantages of .NETp. 3
Where C# Fits Inp. 4
What You Need to Write and Run C# Codep. 6
What This Book Coversp. 6
The C# Languagep. 7
.NET Programmingp. 7
Data Accessp. 7
Internet Programmingp. 7
Componentsp. 7
Advanced .NET Programmingp. 7
Conventionsp. 7
Technical Supportp. 8
p2p.wrox.comp. 9
C# and .NET Architecturep. 11
The Relationship of C# to .NETp. 12
The Common Language Runtimep. 12
Advantages of Managed Codep. 12
A Closer Look at Intermediate Languagep. 16
Support for Object Orientation and Interfacesp. 16
Distinct Value and Reference Typesp. 17
Strong Data Typingp. 18
Error Handling Via Exceptionsp. 24
Use of Attributesp. 25
Assembliesp. 25
Private Assembliesp. 26
Shared Assembliesp. 27
Reflectionp. 27
.NET Framework Classesp. 27
Namespacesp. 29
Creating .NET Applications Using C#p. 29
Creating ASP .NET Applicationsp. 29
Creating Windows Formsp. 32
Windows Servicesp. 32
The Role of C# in .NET Enterprise Architecturep. 32
Summaryp. 34
C# Basicsp. 37
Before We Startp. 38
Our First C# Programp. 38
A Closer Lookp. 39
Variablesp. 42
Initialization of Variablesp. 42
Variable Scopep. 44
Constantsp. 46
Predefined Data Typesp. 47
Value Types and Reference Typesp. 47
CTS Typesp. 49
Predefined Value Typesp. 49
Predefined Reference Typesp. 53
Flow Controlp. 55
Conditional Statementsp. 55
Loopsp. 60
Jump Statementsp. 63
Program Structurep. 64
Classesp. 65
Structsp. 67
Methodsp. 68
Declaring Methodsp. 68
Invoking Methodsp. 69
Passing Parameters to Methodsp. 71
Arraysp. 74
Array Syntaxp. 74
Operatorsp. 78
Operator Shortcutsp. 80
The Ternary Operatorp. 81
checked and uncheckedp. 82
isp. 83
sizeofp. 83
typeofp. 83
Operator Precedencep. 83
Type Safetyp. 84
Type Conversionsp. 84
Boxing and Unboxingp. 88
Enumerationsp. 89
Namespacesp. 91
The using Statementp. 92
Namespace Aliasesp. 93
The Main() Methodp. 94
Multiple Main() Methodsp. 94
Passing Arguments to Main()p. 95
More on Compiling C# Filesp. 96
Console I/Op. 98
Using Commentsp. 100
XML Documentationp. 101
Identifiers and Keywordsp. 104
Summaryp. 105
Object-Oriented C#p. 109
Classes and Inheritancep. 110
Single Implementation Inheritancep. 110
Method Overloadingp. 111
Method Overriding and Hidingp. 112
Calling Base Versions of Functionsp. 114
Abstract Classes and Functionsp. 115
Sealed Classes and Methodsp. 115
Access Modifiersp. 116
Propertiesp. 117
Read-Only and Write-Only Propertiesp. 118
Access Modifiersp. 118
Virtual and Abstract Propertiesp. 119
Inliningp. 119
The Object Classp. 119
The ToString() methodp. 121
Interfacesp. 122
Construction and Disposalp. 129
Constructorsp. 130
Cleaning up: Destructors and Dispose()p. 140
Using the IDisposable Interfacep. 144
Implementing Destructors and Dispose()p. 145
readonly Fieldsp. 146
Structsp. 148
Structs Are Value Typesp. 149
Structs and Inheritancep. 150
Constructors for Structsp. 151
Operator Overloadingp. 151
How Operators Workp. 153
Indexersp. 162
Summaryp. 166
Advanced C# Topicsp. 169
Errors and Exception Handlingp. 170
Exception Classesp. 170
Catching Exceptionsp. 172
User-Defined Exception Classesp. 182
User-Defined Castsp. 190
Implementing User-Defined Castsp. 192
Multiple Castingp. 199
Delegatesp. 203
Using Delegates in C#p. 204
SimpleDelegate Examplep. 207
BubbleSorter Examplep. 209
Multicast Delegatesp. 212
Eventsp. 214
The Consumer's View of Eventsp. 215
Events Example: Console Notificationsp. 217
The C# Preprocessor Directivesp. 224
#define and #undefp. 224
#if, #elif, #else, and #endifp. 225
#warning and #errorp. 226
#region and #endregionp. 226
#linep. 227
Attributesp. 227
Memory Management Under the Hoodp. 231
Unsafe Codep. 237
Pointersp. 237
Using Pointers to Optimize Performancep. 252
Summaryp. 256
C# and the Base Classesp. 259
System.Objectp. 260
Comparing Reference Objects for Equalityp. 262
Comparing Value Types for Equalityp. 264
String Handlingp. 264
System.Stringp. 265
Building Stringsp. 266
Format Stringsp. 270
Regular Expressionsp. 276
Introduction to Regular Expressionsp. 277
The RegularExpressionsPlayaround Examplep. 278
Displaying Resultsp. 280
Matches, Groups, and Capturesp. 282
Groups of Objectsp. 284
Array Listsp. 285
Collectionsp. 287
Dictionariesp. 291
Custom Attributesp. 301
Writing Custom Attributesp. 302
The WhatsNewAttributes Examplep. 306
Reflectionp. 309
The System Type Classp. 309
The TypeView Examplep. 312
The Assembly Classp. 314
Completing the WhatsNewAttributes Samplep. 316
Threadingp. 320
Applications with Multiple Threadsp. 321
Manipulating Threadsp. 322
The ThreadPlayaround Samplep. 325
Thread Prioritiesp. 328
Synchronizationp. 329
Summaryp. 334
Programming in the .NET Environmentp. 337
Visual Studio .NETp. 338
Creating a Projectp. 341
Solutions and Projectsp. 346
Windows Application Codep. 350
Reading in Visual Studio 6 Projectsp. 350
Exploring and Coding a Projectp. 351
Building a Projectp. 363
Debuggingp. 367
Other .NET Toolsp. 370
WinCVp. 371
.NET Usage Guidelinesp. 372
Naming Conventionsp. 373
Use of Properties and Methodsp. 377
Use of Fieldsp. 377
Summaryp. 378
Windows Applicationsp. 381
Windows Applications in .NETp. 382
Windows Formsp. 384
Windows Forms Without Visual Studio .NETp. 384
Windows Forms Using Visual Studio .NETp. 389
Menusp. 395
Dialogsp. 401
Visual Inheritancep. 411
Windows Controlsp. 415
Dynamic Controlsp. 416
Custom Controlsp. 421
The UserControl Classp. 421
Summaryp. 435
Assembliesp. 437
What are Assemblies?p. 437
The Answer to DLL Hellp. 438
Features of Assembliesp. 439
Application Domains and Assembliesp. 440
Assembly Structurep. 443
Assembly Manifestsp. 444
Namespaces, Assemblies, and Componentsp. 444
Private and Shared Assembliesp. 445
Viewing Assembliesp. 445
Building Assembliesp. 447
Cross-Language Supportp. 451
The CTS and the CLSp. 452
Language Independence in Actionp. 453
CLS Requirementsp. 462
Adding Resources to Assembliesp. 464
Creating Resource Filesp. 465
Using Resource Filesp. 466
Internationalization and Resourcesp. 469
Localization Example Using Visual Studio .NETp. 475
Global Assembly Cachep. 485
Native Image Generatorp. 486
Global Assembly Cache Viewerp. 486
Creating Shared Assembliesp. 488
Shared Assembly Namesp. 488
Creating a Shared Assemblyp. 491
Configurationp. 495
Configuration Categoriesp. 495
Versioningp. 496
Configuring Directoriesp. 505
Deploymentp. 508
Deployment of DLLsp. 508
Creating a Merge Modulep. 508
Summaryp. 510
Data Access with .NETp. 513
ADO.NET Overviewp. 514
Namespacesp. 514
Shared Classesp. 515
Database Specific Classesp. 515
Using Database Connectionsp. 516
Using Connections Efficientlyp. 517
Transactionsp. 520
Commandsp. 521
Executing Commandsp. 522
Calling Stored Proceduresp. 526
Quick Data Access: The Data Readerp. 529
Managing Data and Relationships: The DataSetp. 532
Data Tablesp. 533
Data Relationshipsp. 540
Data Constraintsp. 542
XML Schemasp. 544
Generating Code with XSDp. 545
Populating a DataSetp. 550
Populating a DataSet Using a DataAdapterp. 550
Populating a DataSet from XMLp. 552
Persisting DataSet Changesp. 552
Updating with Data Adaptersp. 553
Writing XML Outputp. 555
Working with ADO.NETp. 557
Tiered Developmentp. 557
Key Generation with SQL Serverp. 558
Naming Conventionsp. 561
Performancep. 562
Summaryp. 563
Viewing .NET Datap. 567
The DataGrid Controlp. 568
Displaying Tabular Datap. 568
Data Sourcesp. 570
DataGrid Class Hierarchyp. 578
Data Bindingp. 582
Simple Bindingp. 582
Data Binding Objectsp. 583
Visual Studio and Data Accessp. 589
Creating a Connectionp. 589
Selecting Datap. 592
Generating a DataSetp. 594
Updating the Data Sourcep. 595
Building a Schemap. 597
Other Common Requirementsp. 603
Summaryp. 611
Manipulating XMLp. 615
XML Standards Support in .NETp. 616
Introducing the System.Xml Namespacep. 616
Using MSXML in .NETp. 617
Using System.Xml Classesp. 621
Reading and Writing Streamed XMLp. 621
Using the XmlTextReader Classp. 622
Using the XmlValidatingReader Classp. 626
Using the XmlTextWriter Classp. 629
Using the DOM in .NETp. 631
Using the XmlDocument Classp. 633
Using XPath and XSLT in .NETp. 637
The System.XPath Namespacep. 638
The System.Xml.Xsl Namespacep. 642
XML and ADO.NETp. 647
Converting ADO.NET Data to XMLp. 647
Converting XML to ADO.NET Datap. 655
Reading and Writing a DiffGramp. 658
Serializing Objects in XMLp. 661
Serialization Without Sourcecode Accessp. 669
Summaryp. 671
File and Registry Operationsp. 673
Managing the File Systemp. 674
.NET Classes that Represent Files and Foldersp. 675
The Path Classp. 677
Example: A File Browserp. 678
Moving, Copying, and Deleting Filesp. 683
Example: FilePropertiesAndMovementp. 684
Reading and Writing to Filesp. 688
Streamsp. 688
Reading and Writing to Binary Filesp. 690
Reading and Writing to Text Filesp. 696
Reading and Writing to the Registryp. 703
The Registryp. 703
The .NET Registry Classesp. 706
Example: SelfPlacingWindowp. 708
Summaryp. 715
Working with the Active Directoryp. 717
Architecture of the Active Directoryp. 718
Featuresp. 718
Active Directory Conceptsp. 719
Characteristics of Active Directory Datap. 723
Schemap. 723
Administration Tools for the Active Directoryp. 724
Active Directory Users and Computersp. 725
ADSI Editp. 726
ADSI Viewerp. 727
Active Directory Service Interfaces (ADSI)p. 729
Programming the Active Directoryp. 729
Classes in System.DirectoryServicesp. 730
Bindingp. 730
Getting Directory Entriesp. 735
Object Collectionsp. 737
Cachep. 738
Creating New Objectsp. 739
Updating Directory Entriesp. 740
Accessing Native ADSI Objectsp. 741
Searching in the Active Directoryp. 742
Searching for User Objectsp. 746
User Interfacep. 746
Get the Schema Naming Contextp. 747
Get the Property Names of the User Classp. 748
Search For User Objectsp. 749
Summaryp. 751
ASP.NET Pagesp. 753
ASP.NET Introductionp. 754
State Management in ASP.NETp. 755
ASP.NET Web Formsp. 755
ASP.NET Server Controlsp. 760
ADO.NET and Data Bindingp. 773
Updating the Event Booking Applicationp. 774
More on Data Bindingp. 782
Application Configurationp. 788
Summaryp. 789
Web Servicesp. 791
SOAPp. 792
WSDLp. 793
Web Servicesp. 795
Exposing Web Servicesp. 795
Consuming Web Servicesp. 798
Extending the Meeting Room Booker Examplep. 801
The Meeting Room Booking Web Servicep. 802
The Meeting Room Booker Clientp. 804
Exchanging Data using SOAP Headersp. 807
Summaryp. 811
User Controls and Custom Controlsp. 815
User Controlsp. 816
A Simple User Controlp. 816
Custom Controlsp. 823
Custom Control Project Configurationp. 824
Basic Custom Controlsp. 829
Creating a Composite Custom Controlp. 835
A Straw Poll Controlp. 837
The Candidate Controlsp. 839
The StrawPoll Control Builderp. 840
Straw Poll Stylep. 842
The Straw Poll Controlp. 842
Summaryp. 849
COM Interoperabilityp. 851
A Quick Tour of COMp. 852
How COM Worksp. 852
Using COM Components in .NETp. 853
Binding to COM Componentsp. 853
Runtime Callable Wrappersp. 853
Using a C++ COM Componentp. 857
Filling a DataSet with a Recordsetp. 860
Late Binding to COM Componentsp. 862
Releasing COM Objectsp. 863
Using ActiveX Controls in .NETp. 864
Using .NET Components in COMp. 866
COM-Callable Wrappersp. 866
The C# Factorial Componentp. 867
Early Binding to .NET Componentsp. 869
Platform Invocation Servicesp. 870
Accessing Unmanaged Codep. 871
Summaryp. 872
COM+ Servicesp. 875
COM+ Services in Perspectivep. 875
The Component Services Snap-Inp. 876
Features of COM+ Servicesp. 877
Transactionsp. 878
Just-In-Time Activation (JIT)p. 879
Securityp. 880
Eventsp. 880
Object Poolingp. 881
Message Queuingp. 882
Component Load Balancingp. 882
Using COM+ Services with .NET Assembliesp. 883
Using Transactions with .NET Assembliesp. 885
Using Object Pooling with .NET Assembliesp. 891
Using JIT Activation with .NET Assembliesp. 893
Summaryp. 894
Graphics with GDI+p. 897
Understanding Drawing Principlesp. 898
GDI and GDI+p. 898
Drawing Shapesp. 900
Painting Shapes Using OnPaint()p. 903
Using the Clipping Regionp. 904
Measuring Coordinates and Areasp. 906
Point and PointFp. 906
Size and SizeFp. 908
Rectangle and RectangleFp. 909
Regionp. 910
A Note about Debuggingp. 911
Drawing Scrollable Windowsp. 912
Colorsp. 919
Red-Green-Blue (RGB) Valuesp. 919
The Named Colorsp. 920
Graphics Display Modes and the Safety Palettep. 920
The Safety Palettep. 921
Pens and Brushesp. 921
Brushesp. 922
Pensp. 923
Drawing Shapes and Linesp. 923
Displaying Imagesp. 926
Issues When Manipulating Imagesp. 928
Drawing Textp. 929
Simple Text Examplep. 930
Fonts and Font Familiesp. 931
Example: Enumerating Font Familiesp. 933
Editing a Text Document: The CapsEditor Samplep. 935
The Invalidate() Methodp. 939
Calculating Item Sizes and Document Sizep. 941
OnPaint()p. 942
Coordinate Transformsp. 943
Responding to User Inputp. 945
Printingp. 948
Summaryp. 954
Accessing the Internetp. 957
The WebClient Classp. 958
Downloading Filesp. 958
Basic Web Client Examplep. 958
Uploading Filesp. 960
WebRequest and WebResponse Classesp. 960
Displaying Output as an HTML Pagep. 963
The Web Request and Web Response Hierarchyp. 965
Utility Classesp. 967
URIsp. 967
IP Addresses and DNS Namesp. 969
Lower-Level Protocolsp. 971
Lower-Level Classesp. 972
Summaryp. 978
Distributed Applications with .NET Remotingp. 981
What is .NET Remoting?p. 982
Web Services Anywherep. 983
CLR Object Remotingp. 983
.NET Remoting Overviewp. 983
Contextsp. 986
Activationp. 987
Attributes and Propertiesp. 988
Communication between Contextsp. 988
Remote Objects, Clients, and Serversp. 988
Remote Objectsp. 989
A Simple Serverp. 990
A Simple Clientp. 991
.NET Remoting Architecturep. 992
Channelsp. 993
Formattersp. 996
ChannelServices and RemotingConfigurationp. 997
Object Activationp. 998
Message Sinksp. 1002
Passing Objects in Remote Methodsp. 1003
Lifetime Managementp. 1007
Miscellaneous .NET Remoting Featuresp. 1010
Configuration Filesp. 1010
Hosting Applicationsp. 1018
Classes, Interfaces, and SoapSudsp. 1019
Tracking Servicesp. 1022
Asynchronous Remotingp. 1024
Remoting and Eventsp. 1025
Call Contextsp. 1031
Summaryp. 1033
Windows Servicesp. 1035
What is a Windows Service?p. 1036
Windows Services Architecturep. 1037
Service Programp. 1037
Service Control Programp. 1039
Service Configuration Programp. 1039
System.ServiceProcess Namespacep. 1040
Creating a Windows Servicep. 1040
A Class Library Using Socketsp. 1041
TcpClient Examplep. 1044
Windows Service Projectp. 1046
Threading and Servicesp. 1051
Service Installationp. 1052
Installation Programp. 1052
Monitoring and Controlling the Servicep. 1058
MMC Computer Managementp. 1058
net.exep. 1059
sc.exep. 1060
Visual Studio .NET Server Explorerp. 1061
ServiceController Classp. 1061
Troubleshootingp. 1067
Interactive Servicesp. 1068
Event Loggingp. 1068
Performance Monitoringp. 1074
Windows 2000 Service Featuresp. 1080
Network Binding Changes and Power Eventsp. 1080
Recoveryp. 1081
COM+ Applications as Servicesp. 1082
Summaryp. 1082
.NET Securityp. 1085
Code Access Securityp. 1086
Code Groupsp. 1087
Code Access Permissions and Permissions Setsp. 1093
Policy Levels: Machine, User, and Enterprisep. 1098
Support for Security in the Frameworkp. 1100
Demanding Permissionsp. 1100
Requesting Permissionsp. 1103
Implicit Permissionp. 1106
Denying Permissionsp. 1107
Asserting Permissionsp. 1108
Creating Code Access Permissionsp. 1110
Declarative Securityp. 1110
Role-Based Securityp. 1111
The Principalp. 1112
Windows Principalp. 1113
Rolesp. 1114
Declarative Role-Based Securityp. 1114
Managing Security Policyp. 1115
The Security Configuration Filep. 1116
Managing Code Groups and Permissionsp. 1120
Turning Security On and Offp. 1121
Resetting Security Policyp. 1121
Creating a Code Groupp. 1121
Deleting a Code Groupp. 1122
Changing a Code Group's Permissionsp. 1122
Creating and Applying Permissions Setsp. 1123
Distributing Code Using a Strong Namep. 1126
Distributing Code Using Certificatesp. 1128
Managing Zonesp. 1136
Summaryp. 1138
Principles of Object-Oriented Programmingp. 1141
A Note for VB 6 Programmersp. 1142
What is an Object?p. 1142
Objects in Programmingp. 1143
Class Membersp. 1143
Defining a Classp. 1144
Instantiating and Using Objectsp. 1145
Using Static Membersp. 1147
A Note About Reference Typesp. 1151
Overloading Methodsp. 1152
Propertiesp. 1154
Introducing Inheritancep. 1156
Using Inheritance in C#p. 1157
Class Hierarchies and Class Designp. 1163
Polymorphism and Virtual Membersp. 1166
Method Hidingp. 1169
Abstract Functions and Base Classesp. 1170
Sealed Classes and Methodsp. 1173
Interfacesp. 1174
Construction and Disposalp. 1175
Creating Constructorsp. 1176
Summaryp. 1179
C# Compilation Optionsp. 1181
Using the C# Compilerp. 1181
Input and Output Filesp. 1183
Compiling Different Project Typesp. 1183
Response Filesp. 1183
Compiler Optionsp. 1184
Indexp. 1191
Table of Contents provided by Ingram. All Rights Reserved.

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