Skip to:Content
|
Bottom
Cover image for Applied microsoft .NET framework programming in microsoft visual basic .NET
Title:
Applied microsoft .NET framework programming in microsoft visual basic .NET
Personal Author:
Publication Information:
Redmond, Washington : Microsoft Press, 2003
ISBN:
9780735617872

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000003605536 QA76.625 R54 2003 Open Access Book Book
Searching...

On Order

Summary

Summary

The Microsoft .NET Framework provides powerful technologies such as ASP.NET Web Forms, XML Web services, and Windows Forms to simplify developing applications and components that work seamlessly on the Internet. This book shows how to make the most of the .NET Framework's common language runtime (CLR). Written by two highly respected developer/writers and intended for anyone who understands OOP concepts such as data abstraction, inheritance, and polymorphism, this book clearly explains the extensible type system of the CLR, examines how the CLR manages the behavior of types, and explores how an application manipulates types. While focusing on Visual Basic .NET, its in-depth explanations and concepts apply equally to all programming languages that target the .NET Framework.

Topics covered include:

The .NET Framework architecture Building, packaging, deploying, and administering applications and their types Building and deploying shared assemblies Type fundamentals Primitive, reference, and value types Operations common to all objects Type members and accessibility Constants, fields, methods, properties, and events Working with text Enumerated types and bit flags Array types Interfaces Custom attributes Delegates Error handling with exceptions Automatic memory management AppDomains and reflection


Author Notes

Jeffrey Richter is a cofounder of Wintellect
Francesco Balena, a trainer and consultant for Wintellect


Table of Contents

Acknowledgmentsp. xvii
Introductionp. xix
Part I Basics of the Microsoft .NET Framework
1 The Architecture of the .NET Framework Development Platformp. 3
Compiling Source Code into Managed Modulesp. 3
Combining Managed Modules into Assembliesp. 8
Loading the Common Language Runtimep. 9
Executing Your Assembly's Codep. 12
IL and Verificationp. 20
The .NET Framework Class Libraryp. 22
The Common Type Systemp. 26
The Common Language Specificationp. 28
Interoperability with Unmanaged Codep. 33
2 Building, Packaging, Deploying, and Administering Applications and Typesp. 37
.NET Framework Deployment Goalsp. 38
Building Types into a Modulep. 39
Combining Modules to Form an Assemblyp. 48
Adding Assemblies to a Project Using the Visual Studio .NET IDEp. 56
Using the Assembly Linkerp. 57
Including Resource Files in the Assemblyp. 59
Assembly Version Resource Informationp. 59
Version Numbersp. 63
Culturep. 65
Simple Application Deployment (Privately Deployed Assemblies)p. 66
Simple Administrative Control (Configuration)p. 68
3 Shared Assembliesp. 73
Two Kinds of Assemblies, Two Kinds of Deploymentp. 74
Giving an Assembly a Strong Namep. 75
The Global Assembly Cachep. 82
The Internal Structure of the GACp. 88
Building an Assembly That References a Strongly Named Assemblyp. 90
Strongly Named Assemblies Are Tamper-Resistantp. 92
Delayed Signingp. 93
Privately Deploying Strongly Named Assembliesp. 97
Side-by-Side Executionp. 100
How the Runtime Resolves Type Referencesp. 101
Advanced Administrative Control (Configuration)p. 104
Publisher Policy Controlp. 110
Repairing a Faulty Applicationp. 113
Part II Working with Types and the Common Language Runtime
4 Type Fundamentalsp. 119
All Types Are Derived from System. Objectp. 119
Visual Basic Standard Modulesp. 121
Casting Between Typesp. 126
Casting with the CType Operatorp. 129
Testing an Object's Type with the TypeOf ... Is Expressionp. 131
Namespaces and Assembliesp. 133
5 Primitive, Reference, and Value Typesp. 139
Programming Language Primitive Typesp. 139
Checked and Unchecked Primitive Type Operationsp. 144
Reference Types and Value Typesp. 146
Boxing and Unboxing Value Typesp. 153
6 Common Object Operationsp. 165
Object Equality and Identityp. 165
Implementing Equals for a Reference Type Whose Base Classes Don't Override Object's Equalsp. 166
Implementing Equals for a Reference Type When One or More of Its Base Classes Overrides Object's Equalsp. 168
Implementing Equals for a Value Typep. 169
Summary of Implementing Equals and the Equality and Inequality Operatorsp. 172
Identityp. 172
Object Hash Codesp. 173
Object Cloningp. 176
Part III Designing Types
7 Type Members and Their Accessibilityp. 181
Type Membersp. 181
Accessibility Modifiers and Predefined Attributesp. 185
Type Predefined Attributesp. 187
Field Predefined Attributesp. 187
Method Predefined Attributesp. 188
8 Constants and Fieldsp. 191
Constantsp. 191
When Is a Constant Not Always a Constant?p. 192
Fieldsp. 194
9 Methodsp. 197
Instance Constructorsp. 197
Type Constructorsp. 204
Passing Parameters by Reference to a Methodp. 208
Passing a Variable Number of Parameters to a Methodp. 211
Optional Argumentsp. 214
Static Variables in a Methodp. 217
Operator Overload Methodsp. 220
Operators and Programming Language Interoperabilityp. 222
Conversion Operator Methodsp. 226
How Virtual Methods Are Calledp. 227
Virtual Method Versioningp. 228
10 Propertiesp. 235
Parameterless Propertiesp. 235
Parameterful Propertiesp. 240
11 Eventsp. 245
Designing a Type That Exposes an Eventp. 246
Designing a Type That Listens for an Eventp. 252
A Simpler Way to Register and Unregister Interest in Eventsp. 255
Part IV Essential Types
12 Working with Textp. 261
Charactersp. 261
The System. String Typep. 265
Constructing Stringsp. 265
Strings Are Immutablep. 268
Comparing Stringsp. 269
String Interningp. 274
String Poolingp. 278
Examining a String's Charactersp. 279
Other String Operationsp. 282
Dynamically Constructing a String Efficientlyp. 282
Constructing a StringBuilder Objectp. 283
StringBuilder's Membersp. 284
Obtaining a String Representation for an Objectp. 287
Specific Formats and Culturesp. 288
Formatting Multiple Objects into a Single Stringp. 292
Providing Your Own Custom Formatterp. 294
Parsing a String to Obtain an Objectp. 297
Encodings: Converting Between Characters and Bytesp. 301
Encoding/Decoding Streams of Characters and Bytesp. 309
Base-64 String Encoding and Decodingp. 310
13 Enumerated Types and Bit Flagsp. 313
Enumerated Typesp. 313
Bit Flagsp. 319
14 Arraysp. 323
All Arrays Are Implicitly Derived from System.Arrayp. 327
Casting Arraysp. 329
Passing and Returning Arraysp. 331
Creating Arrays That Have a Nonzero Lower Boundp. 332
Fast Array Accessp. 334
Redimensioning an Arrayp. 338
15 Interfacesp. 343
Interfaces and Inheritancep. 343
Designing an Application That Supports Plug-In Componentsp. 350
Changing Fields in a Boxed Value Type Using Interfacesp. 351
Implementing Multiple Interfaces That Have the Same Method Name and Signaturep. 355
Improving Type Safety and Reducing Boxingp. 358
16 Custom Attributesp. 363
Using Custom Attributesp. 363
Defining Your Own Attributep. 367
Attribute Constructor and Field/Property Data Typesp. 371
Detecting the Use of a Custom Attributep. 372
Matching Two Attribute Instances Against Each Otherp. 377
Pseudo-Custom Attributesp. 381
17 Delegatesp. 383
A First Look at Delegatesp. 383
Using Delegates to Call Back Static Methodsp. 386
Using Delegates to Call Back Instance Methodsp. 388
Demystifying Delegatesp. 389
Some Delegate History: System.Delegate and System.MulticastDelegatep. 394
Comparing Delegates for Equalityp. 395
Delegate Chainsp. 396
Having More Control over Invoking a Delegate Chainp. 401
Delegates and Reflectionp. 404
Part V Managing Types
18 Exceptionsp. 411
The Mechanics of Exception Handlingp. 412
The Try Blockp. 414
The Catch Blockp. 414
The Finally Blockp. 416
What Exactly Is an Exception?p. 417
The System.Exception Classp. 422
FCL-Defined Exception Classesp. 424
Defining Your Own Exception Classp. 427
How to Use Exceptions Properlyp. 432
You Can't Have Too Many Finally Blocksp. 432
Don't Catch Everythingp. 433
Gracefully Recovering from an Exceptionp. 435
Backing Out of a Partially Completed Operation When an Unrecoverable Exception Occursp. 436
Hiding an Implementation Detailp. 437
What's Wrong with the FCLp. 440
Performance Considerationsp. 442
Catch Filtersp. 445
What Happened to the On Error Statement?p. 449
Unhandled Exceptionsp. 450
Controlling What the CLR Does When an Unhandled Exception Occursp. 456
Unhandled Exceptions and Windows Formsp. 457
Unhandled Exceptions and ASP.NET Web Formsp. 459
Unhandled Exceptions and ASP.NET XML Web Servicesp. 460
Exception Stack Tracesp. 460
Remoting Stack Tracesp. 463
Debugging Exceptionsp. 464
Telling Visual Studio What Kind of Code to Debugp. 468
19 Automatic Memory Management (Garbage Collection)p. 471
Understanding the Basics of Working in a Garbage-Collected Platformp. 471
The Garbage Collection Algorithmp. 475
Finalizationp. 480
What Causes Finalize Methods to Get Calledp. 485
Finalization Internalsp. 487
The Dispose Pattern: Forcing an Object to Clean Upp. 491
Using a Type That Implements the Dispose Patternp. 499
Accounting for Exceptions When Using the Dispose Patternp. 504
An Interesting Dependency Issuep. 505
Weak Referencesp. 506
Weak Reference Internalsp. 508
Resurrectionp. 510
Designing an Object Pool Using Resurrectionp. 512
Generationsp. 515
Programmatic Control of the Garbage Collectorp. 521
Other Garbage Collector Performance Issuesp. 523
Synchronization-Free Allocationsp. 525
Scalable Parallel Collectionsp. 525
Concurrent Collectionsp. 525
Large Objectsp. 527
Monitoring Garbage Collectionsp. 528
20 CLR Hosting, AppDomains, and Reflectionp. 529
Metadata: The Cornerstone of the .NET Frameworkp. 529
CLR Hostingp. 530
AppDomainsp. 532
Accessing Objects Across AppDomain Boundariesp. 536
AppDomain Eventsp. 537
Applications and How They Host the CLR and Manage AppDomainsp. 538
"Yukon"p. 540
The Gist of Reflectionp. 540
Reflecting Over an Assembly's Typesp. 542
Reflecting Over an AppDomain's Assembliesp. 545
Reflecting Over a Type's Members: Bindingp. 546
Explicitly Loading Assembliesp. 547
Loading Assemblies as "Data Files"p. 550
Building a Hierarchy of Exception-Derived Typesp. 551
Explicitly Unloading Assemblies: Unloading an AppDomainp. 554
Obtaining a Reference to a System.Type Objectp. 556
Reflecting Over a Type's Membersp. 560
Creating an Instance of a Typep. 563
Calling a Type's Methodp. 565
Bind Once, Invoke Multiple Timesp. 570
Reflecting Over a Type's Interfacesp. 576
Reflection Performancep. 578
Indexp. 581
Go to:Top of Page