Application Development Using C# and .NET
Read it now on the O’Reilly learning platform with a 10-day free trial.
O’Reilly members get unlimited access to books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.
Book description
Build industrial-strength .NET applications with C#!
- Practical, useful information on the .NET Framework, the Common Language Runtime, ADO.NET, ASP.NET, Web Services, security, interoperability, and more
- Running case study: see how concepts work together when you build .NET applications
- Experienced C++, Java, and Visual Basic programmers: become effective with .NET!
This book gives experienced developers all the practical insight they need to build enterprise applications for Microsoft's .NET platform using C#. Using extensive code examples and a running case study, the authors illuminate the .NET concepts and technologies that offer the greatest power and value. They cover the entire process of constructing a .NET application: creating a monolithic C# console application; enhancing it with a Windows Forms interface; isolating functionality inside components, adding database access and security; and finally, delivering functionality through ASP.NET and Web Services.
- .NET Framework and Common Language Runtime fundamentals for experienced programmers
- Key .NET features: interfaces, attributes, collections, threading, remoting, assemblies, and more
- Hands-on coverage of ADO.NET, ASP.NET, Web Services, and user interface programming
- Component deployment and versioning
- Ensuring interoperability with diverse and legacy systems
- Includes a self-contained C# overview for those new to the language
Part of The Integrated .NET series from Object Innovations.
Show and hide more
Table of contents Product information
Table of contents
- Copyright
- Dedication
- Organization
- Sample Programs
- Caveat
- Web Sites
- Introduction
- Introductory .NET Language Books
- Introduction to C# Using .NET
- Introduction to Programming Visual Basic Using .NET
- Programming Perl in the .NET Environment
- Intermediate .NET Framework Books
- Application Development Using C# and .NET
- Application Development Using Visual Basic .NET
- .NET Architecture and Programming Using Visual C++
- Fundamentals of Web Applications Using .NET and XML
- Microsoft and the Web
- Applications in the Internet Age
- Web Services
- ASP.NET
- Open Standards and Interoperability
- Communications Protocols
- Problems with Windows
- The Glass House and Thin Clients
- A Robust Windows
- .NET Framework
- Common Language Runtime
- Managed Code and Data
- Verifiable Code
- Success Factors for Web Services
- Problems of Windows Development
- Applications of the Future
- .NET Overview
- The Magic of Metadata
- .NET Framework Class Library
- Interface-Based Programming
- Everything Is an Object
- Common Type System
- ILDASM
- Language Interoperability
- Managed Code
- Assemblies
- JIT Compilation
- Performance
- Hello World in C#
- Compiling and Running (Command Line)
- Program Structure
- Namespaces
- Variables
- Literals
- C# Operators and Expressions
- Output and Formatting
- Placeholders
- Format Strings
- Sample Formatting Code
- Switch Statement
- Using the InputWrapper Class
- Compiling Multiple Files
- InputWrapper Class Implementation
- Classes as Structured Data
- Classes and Objects
- References
- Constructors
- Default Constructor
- Instantiating and Using an Object
- Assigning Object References
- Garbage Collection
- Public and Private
- This
- Sample Program
- Static Methods
- Sample Program
- Overview of Types in C#
- Value Types
- Reference Types
- Pointer Types
- Simple Types
- Types in System Namespace
- Structures
- Enumeration Types
- Class Types
- Object
- String
- Characters
- ASCII and Unicode
- Escape Sequences
- String Literals and Initialization
- Concatenation
- Index
- Relational Operators
- Length
- ToUpper
- ToLower
- Substring
- IndexOf
- Arrays
- One-Dimensional Arrays
- Constructors
- Next Methods
- NextDouble Method
- Parameter Passing
- Value Parameters
- Reference Parameters
- Output Parameters
- Method Overloading
- Modifiers as Part of the Signature
- Exception Fundamentals
- .NET Exception Handling
- Exception Flow of Control
- Context and Stack Unwinding
- Example Program
- System.Exception
- Finally Block
- Unsafe Blocks
- Pointers
- Fixed Memory
- Review of Object-Oriented Concepts
- Objects
- Objects in the Real World
- Object Models
- Reusable Software Components
- Objects in Software
- Abstraction
- Encapsulation
- Inheritance
- Abstract Classes
- Relationships Among Classes
- Designing the Abstractions
- Reservable
- Reservation
- Broker
- ReservationResult
- Reserve
- Lists of Reservations and Reservables
- Inheritance Fundamentals
- C# Inheritance Syntax
- Changing the Interface to Existing Members
- Invoking Base Class Constructors
- Class Accessibility
- Public
- Internal
- Public
- Private
- Protected
- Internal
- Internal Protected
- Running the Case Study
- HotelReservation
- HotelBroker
- Customers
- Namespace
- TestHotel
- Employee Class Hierarchy
- Method Hiding
- Static Binding
- Type Conversions in Inheritance
- Virtual Methods and Efficiency
- Method Overriding
- System.Object
- Public Instance Methods of object
- Equals
- ToString
- GetHashCode
- GetType
- MemberWiseClone
- Finalize
- Default Methods of Object
- Overriding Methods of Object
- ArrayList Example
- Customers Class
- Interface Fundamentals
- Interfaces in C#
- Implementing an Interface
- Using an Interface
- Interface Inheritance
- Implementing Multiple Interfaces
- Using Multiple Interfaces
- As Operator
- Is Operator
- The Contracts
- Customer Contract
- Hotel Contracts
- Structures
- Collection Interfaces
- Interface Documentation
- IEnumerable And IEnumerator
- ICollection
- IList
- Shallow Copy and Deep Copy
- Example Program
- Reference Copy by Assignment
- Memberwise Clone
- Using ICloneable
- Sorting an Array
- Implementing IComparable
- Declaring a Delegate
- Defining a Method
- Creating a Delegate Object
- Calling a Delegate
- Combining Delegate Objects
- Complete Example
- Stock Market Simulation
- Running the Simulation
- Delegate Code
- Passing the Delegates to the Engine
- Random-Number Generation
- Using the Delegates
- Events
- Client Code
- Server Code
- Attributes in .NET
- Preprocessor Symbols Using Compiler Option
- Using Attributes
- Attribute Targets
- Windows Forms Hierarchy
- Simple Forms Using .NET SDK
- Step 0:. A Simple Form
- Windows Messages
- Windows Forms Event Handling
- HAndling Left and Right Buttons
- KeyPress Event
- Step 4:. A Menu to Exit the Program
- Menu Code
- Menu Event Code
- Step 5:. Using a TextBox Control
- Windows Forms Demonstration
- Design Window and Code Window
- Adding an Event
- Code for Event Handler
- Using the Menu Control
- Closing a Form
- .NET Dialog Documentation
- Dialog Box Demonstration
- Creating a Modal Dialog
- Passing Information Between Parent Form and a Dialog
- Populating a ListBox
- Selecting an Item From a ListBox
- Assemblies
- Contents of an Assembly
- Versioning an Assembly
- Strong Names
- Digital Signatures
- Digitally Signing an Assembly
- Deploying a Shared Assembly
- Versioning Shared Components
- Resolving an Assembly Reference at Runtime
- Specifying the Version Policy in a Configuration File
- Finding the Assembly’s Physical Location
- Assembly Location and Visual Studio.NET
- CAB Project
- Setup Project
- Merge Module Project
- Web-based Deployment
- Metadata and Reflection
- Type
- Late Binding
- Streams
- Primitive Datatypes and Streams
- TextReader and TextWriter
- File Manipulation
- File Class
- Path Class
- FileInfo Class
- File Example
- Serialization Objects
- ISerializable
- Threads
- Thread Synchronization
- Synchronization with Monitors
- Notification with Monitors
- Synchronization Classes
- Automatic Synchronization
- Proxies and Stubs
- ContextBoundObject
- Application Domain
- Application Domains and Assemblies
- AppDomain Class
- App Domain Events
- AppDomain Example
- Marshaling, AppDomains, and Contexts
- The Asynchronous Design Pattern
- IAsyncResult
- Using Delegates for Asynchronous Programming
- Begin/End Invoke
- Asynchronous Callback
- Remoting Overview
- Interception
- Channels And Formatters
- Sample Remoting Program
- Using a Custom Attribute
- Defining an Attribute Class
- Defining a Base Class
- Finalize
- C# Destructor Notation
- Limitations of Finalization
- Alternate Name for Dispose
- Generations
- SuppressFinalize
- Collect
- MaxGeneration
- GetGeneration
- GetTotalMemory
- .NET Data Providers
- The Visual Studio.NET Server Explorer
- Data Readers
- The Connected Database Scenario
- Executing SQL Statements
- DataReader
- Multiple Result Sets
- Disconnected Mode
- Updating the Data Source
- Auto Generated Command Properties
- Multiple Tables in a DataSet
- Table Creation without a Data Source
- Constraints and Relations
- Primary Keys
- Constraints
- Data Relations
- Navigating Relationships
- BeginEdit, EndEdit, CancelEdit
- DataRow Versions
- DataRow RowState Property
- Accepting and Rejecting Changes
- DataRow Errors
- XML Schema and Data
- XmlDataDocument
- DataSet and XML
- DataSet and XML
- Creating an XML Doc from a Dataset
- Generating Typed DataSets
- Fetching Data with a Typed DataSet
- Displaying Data with a Typed Dataset
- Modify Data with a Typed Dataset
- What Is ASP.NET?
- Web Application Fundamentals
- Setting up the Web Examples
- Compiled Code
- Server Controls
- Browser Independence
- Separation of Code and Content
- State Management
- Page Class
- Inheriting from Page Class
- Page Events
- Page Properties
- Sample Program
- Src
- Language
- Inherits
- Debug
- ErrorPage
- Trace
- HttpRequest Class
- Collections
- Example Program
- Redirect
- Hotel Information Web Page (Step 0)
- Configuring Web Server Connection
- Creating an ASP.NET Web Application
- Using the Form Designer
- Initializing the HotelBroker
- Data Binding
- Initializing the Hotels
- Selecting a City
- AutoPostBack
- Debugging
- Using Project | Copy Project.
- Precompiled Web Page
- Inherits Attribute in Page Directive
- Configuring a Virtual Directory as an Application
- Moving a Visual Studio ASP.NET Web Application Project
- Configuring the Case Study
- Acme Web Site Step 1
- HotelReservations.Aspx
- ManageReservations.Aspx
- AcmeLib Component
- Login.Aspx
- RegisterNewUser.Aspx
- Main.Aspx
- Sessions
- Global.asax
- Static Data Members
- Application Object
- Session Object
- Session State and Cookies
- Session State Timeout
- Session State Store
- Configuration Files
- Server Configuration File
- Application Configuration Files
- Configuration File Format
- Web Controls
- Html Controls Example
- HTML Controls in Visual Studio
- Validation Controls
- Required Field Validation
- Regular Expression Validation
- Data Binding in ASP.NET
- Binding to an Arraylist
- Binding to a Datatable
- AcmeCustomerDatabase
- AcmeLibDb Component
- Acme Web Site (Step 3)
- Protocols
- XML
- XML Namespaces
- XML Schema
- SOAP
- WSDL
- The Add Web Service Example
- A Client Program for the Add Web Service
- WSDL
- Proxy Classes
- Web Service Client with Raw SOAP and HTTP
- Customer Web Service
- Hotel Broker Web Service
- Design Considerations
- User-Based Security
- Code Access Security
- Security Policy
- Permissions
- Internet Information Server
- Principals and Identities
- .NET Windows Roles
- Other Identity Classes
- ASP.NET Roles
- Operating System Identity and CLR Identity
- Unauthenticated Users
- Authenticated Users
- Problems with Impersonation
- Forms Authentication and Authorization
- Database Login Validation
- Simple Permission Code Request
- How a Permission Request Works
- Strategy for Requesting Permissions
- Denying Permissions
- Asserting Permissions
- Other Permission Methods
- SecurityPermission Class
- Unmanaged Code
- Attribute-Based Permissions
- Principal Permission
- PermissionSet
- Identity Permission Classes
- Evidence
- Security Policy Levels
- Code Groups
- Named Permission Sets
- Altering Security Policy
- The TraceDemo Example
- Enabling Debug and Trace Output
- Using the Debug and Trace Classes
- Using Switches to Enable Diagnostics
- Enabling or Disabling Switches
- Configuration File Switch Settings
- Programmatic Switch Settings
- Using Switches to Control Output
- Calling COM Components from Managed Code
- The Tlbimp.exe Utility
- Demonstration: Wrapping a Legacy COM Server
- Register the COM Server
- Run the COM Client
- Import the Type Library (TlbImp.exe)
- Implement the .NET Client Program
- Import a Type Library Using Visual Studio
- Dual Interfaces
- Pure Vtable Interface
- A Late Binding COM Client
- A Simple Example
- Marshaling out Parameters
- Translating Types
- Overview of Visual Studio.NET
- Toolbars
- Customizing a Toolbar
- Creating a C# Project
- Adding a C# File
- Using the Visual Studio Text Editor
- Building the Project
- Running the Program
- Running the Program in the Debugger
- Creating a New Configuration
- Setting Build Settings for a Configuration
- Just-in-Time Debugging
- Standard Debugging
- Breakpoints
- Watching Variables
- Debugger Options
- Single Stepping
Show and hide more
Product information
- Title: Application Development Using C# and .NET
- Author(s): Michael Stiefel, Robert J. Oberg
- Release date: December 2001
- Publisher(s): Pearson
- ISBN: 013093383X