100% found this document useful (5 votes)
20 views

Introduction to C Programming for the Microsoft NET Platform 1st edition by Administrator - Experience the full ebook by downloading it now

The document provides information about the 'Introduction to C Programming for the Microsoft .NET Platform' ebook and related resources available for instant download at ebookball.com. It outlines the course content, prerequisites, objectives, and materials for a five-day instructor-led course aimed at experienced developers. Additionally, it includes details on various editions of C programming books and the structure of the course materials.

Uploaded by

nouijikrmak
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (5 votes)
20 views

Introduction to C Programming for the Microsoft NET Platform 1st edition by Administrator - Experience the full ebook by downloading it now

The document provides information about the 'Introduction to C Programming for the Microsoft .NET Platform' ebook and related resources available for instant download at ebookball.com. It outlines the course content, prerequisites, objectives, and materials for a five-day instructor-led course aimed at experienced developers. Additionally, it includes details on various editions of C programming books and the structure of the course materials.

Uploaded by

nouijikrmak
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 87

Instant Ebook Access, One Click Away – Begin at ebookball.

com

Introduction to C Programming for the Microsoft


NET Platform 1st edition by Administrator

https://ebookball.com/product/introduction-to-c-programming-
for-the-microsoft-net-platform-1st-edition-by-
administrator-15220/

OR CLICK BUTTON

DOWLOAD EBOOK

Get Instant Ebook Downloads – Browse at https://ebookball.com


Your digital treasures (PDF, ePub, MOBI) await
Download instantly and pick your perfect format...

Read anywhere, anytime, on any device!

Introduction to C Programming for the Microsoft NET


Platform 1st edition by Administrator

https://ebookball.com/product/introduction-to-c-programming-for-the-
microsoft-net-platform-1st-edition-by-administrator-15220/

ebookball.com

Introduction to C Programming for the Microsoft NET


Platform 1st Edition by Administrator

https://ebookball.com/product/introduction-to-c-programming-for-the-
microsoft-net-platform-1st-edition-by-administrator-15326/

ebookball.com

Introduction to C Programming for the Microsoft NET


Platform 1st Edition by Administrator

https://ebookball.com/product/introduction-to-c-programming-for-the-
microsoft-net-platform-1st-edition-by-administrator-15318/

ebookball.com

Introduction to C Programming for the Microsoft NET


Platform 1st Edition by Workbook

https://ebookball.com/product/introduction-to-c-programming-for-the-
microsoft-net-platform-1st-edition-by-workbook-15360/

ebookball.com
Introduction to C Programming for the Microsoft IT And
Computer CLXV 1st Edition by Microsoft Corporation

https://ebookball.com/product/introduction-to-c-programming-for-the-
microsoft-it-and-computer-clxv-1st-edition-by-microsoft-
corporation-15322/

ebookball.com

Introduction to C Programming for the Microsoft IT And


Computer CLXXII 3rd Edition by Robert Lafore 8175152699
9788175152694

https://ebookball.com/product/introduction-to-c-programming-for-the-
microsoft-it-and-computer-clxxii-3rd-edition-by-robert-
lafore-8175152699-9788175152694-15272/

ebookball.com

Microsoft C Programming for the Absolute Beginner 1st


edition by Andrew Harris 1931841160 9781931841160

https://ebookball.com/product/microsoft-c-programming-for-the-
absolute-beginner-1st-edition-by-andrew-
harris-1931841160-9781931841160-15246/

ebookball.com

Microsoft Visual C# 2017 An Introduction to Object


Oriented Programming 7th Edition by Joyce Farrell ISBN
1337102100 9781337102100

https://ebookball.com/product/microsoft-visual-c-2017-an-introduction-
to-object-oriented-programming-7th-edition-by-joyce-farrell-
isbn-1337102100-9781337102100-25038/

ebookball.com

Microsoft C Programming for the Absolute Beginner 1st


Edition by Andrew Harris 1931841160 978-1931841160

https://ebookball.com/product/microsoft-c-programming-for-the-
absolute-beginner-1st-edition-by-andrew-
harris-1931841160-978-1931841160-15316/

ebookball.com
Introduction to C# Programming
for the Microsoft .NET Platform ®

(Prerelease)
Workbook
Course Number: 2124A

This course is based on the prerelease Beta 1 version of Microsoft® Visual Studio .NET.
Content in the final release of the course may be different from the content included in this
prerelease version. All labs in the course are to be completed with the Beta 1 version of
Visual Studio .NET.

Part Number: X08-16666


Released: 03/2001
Information in this document is subject to change without notice. The names of companie s,
products, people, characters, and/or data mentioned herein are fictitious and are in no way intended
to represent any real individual, company, product, or event, unless otherwise noted. Complying
with all applicable copyright laws is the responsibility of the user. No part of this document may
be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose, without the express written permission of Microsoft Corporation. If, however, your only
means of access is elect ronic, permission to print one copy is hereby granted.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.

 2001 Microsoft Corporation. All rights reserved.

Microsoft, ActiveX, BackOffice, BizTalk, IntelliSense, JScript, MSDN, MS-DOS, PowerPoint,


Visual Basic, Visual C++, Visual C#, Visual Studio, Windows, Windows NT, and Windows
Media are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A.
and/or other countries.

Other product and company names mentioned herein may be the trademarks of their respective
owners.

Course Number: 2124A


Part Number: X08-16666
Released: 03/2001
Introduction to C# Programming for the Microsoft® .NET Platform (Prerelease) iii

Contents
Introduction
Course Materials.......................................................................................... 2
Prerequisites................................................................................................ 3
Course Outline ................................ ................................ ............................ 4
Course Outline (continued) ........................................................................... 5
Course Outline (continued) ........................................................................... 6
Microsoft Certified Professional Program ....................................................... 7
Facilities..................................................................................................... 9
Module 1: Overview of the Microsoft .NET Platform
Overview................................ ................................ ................................ .... 1
Introduction to the .NET Platform.................................................................. 2
Overview of the .NET Framework ................................................................. 4
Benefits of the .NET Framework ................................................................... 5
The .NET Framework Components ................................................................ 7
Languages in the .NET Framework.............................................................. 13
Review ..................................................................................................... 14
Module 2: Overview of C#
Overview................................ ................................ ................................ .... 1
Structure of a C# Program............................................................................. 2
Basic Input/Output Operations....................................................................... 9
Recommended Practices ............................................................................. 15
Compiling, Running, and Debugging............................................................ 22
Lab 2: Creating a Simple C# Program........................................................... 36
Review ..................................................................................................... 45
Module 3: Using Value-Type Variables
Overview................................ ................................ ................................ .... 1
Common Type System ................................................................................. 2
Naming Variables ........................................................................................ 9
Using Built- in Data Types........................................................................... 15
Compound Assignment .............................................................................. 18
Increment and Decrement........................................................................... 20
Creating User-Defined Data Types............................................................... 24
Converting Data Types ............................................................................... 28
Lab 3: Creating and Using Types ................................................................. 32
Review ..................................................................................................... 36
Module 4: Statements and Exceptions
Overview................................ ................................ ................................ .... 1
Introduction to Statements................................ ................................ ............ 2
Using Selection Statements ........................................................................... 6
Using Iteration Statements ................................ ................................ .......... 17
Using Jump Statements............................................................................... 29
Lab 4.1: Using Statements ................................ ................................ .......... 32
Handling Basic Exceptions ......................................................................... 41
Raising Exceptions .................................................................................... 51
iv Introduction to C# Programming for the Microsoft® .NET Platform (Prerelease)

Lab 4.2: Using Exceptions ................................ ................................ .......... 62


Review ..................................................................................................... 72
Module 5: Methods and Parameters
Overview................................ ................................ ................................ .... 1
Using Methods ................................ ................................ ............................ 2
Using Parameters....................................................................................... 16
Using Overloaded Methods ......................................................................... 30
Lab 5: Creating and Using Methods ............................................................. 38
Review ..................................................................................................... 50
Module 6: Arrays
Overview................................ ................................ ................................ .... 1
Overview of Arrays...................................................................................... 2
Creating Arrays ......................................................................................... 11
Using Arrays ............................................................................................. 18
Lab 6: Creating and Using Arrays ................................................................ 31
Review ..................................................................................................... 42
Module 7: Essentials of Object-Oriented Programming
Overview................................ ................................ ................................ .... 1
Classes and Objects...................................................................................... 2
Using Encapsulation................................................................................... 10
C# and Object Orientation........................................................................... 21
Lab 7: Creating and Using Classes ............................................................... 39
Defining Object-Oriented Systems............................................................... 53
Review ..................................................................................................... 62
Module 8: Using Reference-Type Variables
Overview................................ ................................ ................................ .... 1
Using Reference-Type Variables................................ ................................ .... 2
Using Common Reference Types ................................................................. 15
The Object Hierarchy ................................................................................. 23
Namespaces in the .NET Framework............................................................ 29
Lab 8.1: Defining And Using Reference-Type Variables ................................. 35
Data Conversions....................................................................................... 43
Multimedia: Type-Safe Casting ................................................................... 56
Lab 8.2 Converting Data............................................................................. 57
Review ..................................................................................................... 63
Module 9: Creating and Destroying Objects
Overview................................ ................................ ................................ .... 1
Using Constructors ...................................................................................... 2
Initializing Data ......................................................................................... 13
Lab 9.1: Creating Objects ........................................................................... 31
Objects and Memory................................ ................................ .................. 39
Using Destructors...................................................................................... 45
Lab 9.2: Destroying Objects........................................................................ 60
Review ..................................................................................................... 65
Module 10: Inheritance in C#
Overview................................ ................................ ................................ .... 1
Deriving Classes.......................................................................................... 2
Implementing Methods ............................................................................... 10
Introduction to C# Programming for the Microsoft® .NET Platform (Prerelease) v

Using Sealed Classes................................ ................................ .................. 26


Using Interfaces......................................................................................... 28
Using Abstract Classes ............................................................................... 42
Lab 10: Using Inheritance to Implement an Interface...................................... 53
Review ..................................................................................................... 71
Module 11: Aggregation, Namespaces, and Advanced Scope
Overview................................ ................................ ................................ .... 1
Using Internal Classes, Methods, and Data...................................................... 2
Using Aggregation ..................................................................................... 11
Lab 11.1: Specifying Internal Access............................................................ 22
Using Namespaces ..................................................................................... 28
Using Modules and Assemblies ................................................................... 49
Lab 11.2: Using Namespaces and Assemblies................................................ 63
Review ..................................................................................................... 69
Module 12: Operators, Delegates, and Events
Overview................................ ................................ ................................ .... 1
Introduction to Operators .............................................................................. 2
Operator Overloading ................................................................................... 8
Lab 12.1: Defining Operators ...................................................................... 21
Creating and Using Delegates ...................................................................... 40
Defining and Using Events................................ ................................ .......... 50
Demonstration: Handling Events................................ ................................ .. 56
Lab 12.2: Defining and Using Events ........................................................... 57
Module 13: Properties and Indexers
Overview................................ ................................ ................................ .... 1
Using Properties .......................................................................................... 2
Using Indexers ................................ ................................ .......................... 17
Lab 13: Using Properties and Indexers................................ .......................... 33
Review ..................................................................................................... 42
Module 14: Attributes
Overview................................ ................................ ................................ .... 1
Overview of Attributes ................................................................................. 2
Defining Custom Attributes ......................................................................... 13
Retrieving Attribute Values ......................................................................... 22
Lab 14: Defining and Using Attributes ......................................................... 26
Review ..................................................................................................... 34
Appendix A: Resources for Further Study
Resources for C# ......................................................................................... 1
Introduction to C# Programming for the Microsoft® .NET Platform (Prerelease) vii

About This Course


This section provides you with a brief description of the course, audience,
suggested prerequisites, and course objectives.

Description
This five-day instructor-led course provides students with the knowledge and
skills needed to develop C# applications for the Microsoft® .NET platform. The
course focuses on C# program structure, language syntax, and implementation
details.

Audience
This course is intended for experienced developers who already have
programming experience in C, C++, Microsoft Visual Basic ®, or Java. These
developers will be likely to develop enterprise business solutions.

Student Prerequisites
This course requires that students meet the following prerequisites:
n Experience programming in C, C++, Visual Basic, Java, or another
programming language
n Familiarity with Microsoft’s .NET strategy as described on
Microsoft’s .NET Web site: http://www.microsoft.com/net/
n Familiarity with the .NET Framework as described in Microsoft MSDN®
Magazine:
http://msdn.microsoft.com/msdnmag/issues/0900/Framework/
Framework. asp
and
http://msdn.microsoft.com/msdnmag/issues/1000/Framework2/
Framework2.asp
viii Introduction to C# Programming for the Microsoft® .NET Platform (Prerelease)

Course Objectives
After completing this course, the student will be able to:
n List the major elements of the .NET Framew ork and explain how C# fits
into the .NET platform.
n Analyze the basic structure of a C# application and be able to debug,
compile, and run a simple application.
n Create, name, and assign values to variables.
n Use common statements to implement flow control, looping, and exception
handling.
n Create methods (functions and subroutines) that can return values and take
parameters.
n Create, initialize, and use arrays.
n Explain the basic concepts and terminology of object-oriented programming.
n Use common objects and references types.
n Create, initialize, and destroy objects in a C# application.
n Build new C# classes from existing classes.
n Create self-contained classes and frameworks in a C# application.
n Define operators and add event specifications.
n Implement properties and indexers.
n Use predefined and custom attributes.
Introduction to C# Programming for the Microsoft® .NET Platform (Prerelease) ix

Student Materials Compact Disc Contents


The Student Materials compact disc contains the following files and folders:
n Autorun.exe. When the CD is inserted into the CD-ROM drive, or when you
double -click the autorun.exe file, this file opens the CD and allows you to
browse the Student Materials CD or install Internet Explorer.
n Default.htm. This file opens the Student Materials Web page. It provides
you with resources pertaining to this course, including add itional reading,
review and lab answers, lab files, multimedia presentations, and course-
related Web sites.
n Readme.txt. This file contains a description of the compact disc contents and
setup instructions in ASCII format (non-Microsoft Word document).
n 2124a_sg.doc. This file is the Classroom Setup Guide. It contains a
description of classroom requirements, classroom setup instructions, and the
classroom configuration.
n AddRead. This folder contains additional reading pertaining to this course.
If there are no additional reading files, this folder does not appear.
n Appendix. This folder contains appendix files for this course. If there are no
appendix files, this folder does not appear.
n Democode. This folder contains demonstration code. If there is no
demonstration code, the Democode folder does not appear.
n Fonts. This folder contains fonts that are required to view the PowerPoint
presentation and Web-based materials.
n Ie5. This folder contains Microsoft Internet Explorer 5.5.
n Labs. This folder contains files that are used in the hands-on labs. These
files may be used to prepare the student computers for the hands-on labs.
n Media. This folder contains files that are used in multimedia presentations
for this course. If this course does not include any multimedia presentations,
this folder does not appear.
n Menu. This folder contains elements for autorun.exe.
n Mplayer. This folder contains files that are required to install Windows
Media Player.
n Practices. This folder contains files that are used in the hands-on practices.
If there are no practices, the Practices folder does not appear.
n Sampapps. This folder contains the sample applications associated with this
course. If there are no associated sample applications, the Sampapps folder
does not appear.
n Sampcode. This folder contains sample code that is accessible through the
Web pages on the Student Materials CD. If there is no sample code, the
Sampcode folder does not appear.
n Sampsite. This folder contains files that create the sample site associated
with this course. I f there is no sample site, the Sampsite folder does not
appear.
n Setup. This folder contains additional files that may be required for lab setup.
If no additional files are required, the Setup folder does not appear.
x Introduction to C# Programming for the Microsoft® .NET Platform (Prerelease)

n Webfiles. This folder contains the files that are required to view the course
Web page. To open the Web page, open Windows Explorer, and in the root
directory of the compact disc, double-click Default.htm or Autorun.exe.
n Wordview. This folder contains the Word Viewer that is used to view any
Word document (.doc) files that are included on the compact disc. If no
Word documents are included, this folder does not appear.
Introduction to C# Programming for the Microsoft® .NET Platform (Prerelease) xi

Document Conventions
The following conventions are used in course materials to distinguish elements
of the text.
Convention Use
u Indicates an introductory page. This symbol appears next
to a topic heading when additional information on the topic
is covered on the page or pages that follow it.
bold Represents commands, command options, and syntax that
must be typed exactly as shown. It also indicates
commands on menus and buttons, dialog box titles and
options, and icon and menu names.
italic In syntax statements or descriptive text, indicates argument
names or placeholders for variable information.
Title Capitals Indicate d omain names, user names, computer names,
directory names, and folder and file names, except when
specifically referring to case-sensitive names. Unless
otherwise indicated, you can use lowercase letters when
you type a directory name or file name in a dialog box or
at a command prompt.
ALL CAPITALS Indicate the names of keys, key sequences, and key
combinations — for example, ALT+SPACEBAR.
monospace Represents code samples or examples of screen text.
[] In syntax statements, enclose optional items. For example,
[filename] in command syntax indicates that you can
choose to type a file name with the command. Type only
the information within the brackets, not the brackets
themselves.
{} In syntax statements, enclose required items. Type only the
information within the braces, not the braces themselves.
| In syntax statements, separates an either/or choice.
å Indicates a procedure with sequential steps.
... In syntax statements, specifies that the preceding item may
be repeated.
. Represents an omitted portion of a code sample.
.
.
THIS PAGE INTENTIONALLY LEFT BLANK
Introduction

Contents

Introduction 1
Course Materials 2
Prerequisites 3
Course Outline 4
Microsoft Certified Professional Program 7
Facilities 9

This course is based on the prerelease Beta 1 version of Microsoft® Visual Studio .NET.
Content in the final release of the course may be different from the content included in
this prerelease version. All labs in the course are to be completed with the Beta 1
version of Visual Studio .NET.
Information in this document is subject to change without notice. The names of companies,
products, people, characters, and/or data mentioned herein are fictitious and are in no way intended
to represent any real individual, company, product, or event, unless otherwise noted. Complying
with all applicable copyright laws is the responsibility of the user. No part of this document may
be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose, without the express written permission of Microsoft Corporation. If, however, your only
means of access is electronic, permission to print one copy is hereby granted.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.

 2001 Microsoft Corporation. All rights reserved.

Microsoft, ActiveX, BizTalk, IntelliSense, JScript, Microsoft Press, MSDN, PowerPoint, Visual
Basic, Visual C++, Visual #, Visual Studio, Windows, and Windows Media are either registered
trademarks or trademarks of Microsoft Corporation in the U.S.A. and/or other countries.

Other product and company names mentioned herein may be the trademarks of their respective
owners.
Introduction 1

Introduction

n Name
n Company Affiliation
n Title/Function
n Job Responsibility
n Programming Experience
n C, C++, Visual Basic, or Java Experience
n Expectations for the Course
2 Introduction

Course Materials

n Name Card
n Student Workbook
n Student Materials Compact Disc
n Course Evaluation

The following materials are included with your kit:


n Name card. Write your name on both sides of the name card.
n Student workbook. The student workbook contains the material covered in
class, in addition to the hands-on lab exercises.
n Student Materials compact disc. The Student Materials compact disc
contains the Web page that provides you with links to resources pertaining
to this course, including additional readings, review and lab answers, lab
files, multimedia presentations, and course-related Web sites.

Note To open the Web page, insert the Student Materials compact disc into
the CD-ROM drive, and then in the root directory of the compact disc,
double -click Autorun.exe or Default.htm.

n Course evaluation. At the conclusion of this course, please complete the


course evaluation to provide feedback on the instructor, course, and
software product. Your comments will help us improve future courses.
To provide additional comments or inquire about the Microsoft Certified
Professional program, send e-mail to mcp@msprograms.com.
Introduction 3

Prerequisites

n Experience Programming in C, C++, Visual Basic or


Java
n Familiarity with Microsoft’s .NET Strategy
n Familiarity with the Microsoft .NET Framework

This course requires that you meet the following prerequisites:


n Experience programming in C, C++, Microsoft Visual Basic ®, Java, or
another programming language
n Familiarity with Microsoft’s .NET strategy as described on
Microsoft’s .NET Web site (http://www.microsoft.com/net/)
n Familiarity with the .NET Frameworks as described in MSDN® Magazine
(http://msdn.microsoft.com/msdnmag/issues/0900/Framework/
Framework.asp and
http://msdn.microsoft.com/msdnmag/issues/1000/Framework2/
Framework2.asp)
4 Introduction

Course Outline

n Module 1: Overview of the Microsoft .NET Platform


n Module 2: Overview of C#
n Module 3: Using Value-Type Variables
n Module 4: Statements and Exceptions
n Module 5: Methods and Parameters

Module 1, “Overview of the Microsoft .NET Platform,”describes the rationale


and features that provide the foundation for the .NET platform, including
the .NET components. The purpose of this module is to build an understanding
of the .NET platform for which you will be developing C# code. After
completing this module, you will be able to describe the components of
the .NET platform.
Module 2, “Overview of C#,” describes the basic structure of a C# application.
This module provides a simple working example for you to analyze to learn
how to use the Console class to perform some basic input and output operations
and to learn best practices for handling errors and documenting your code.
After completing this module, you will be able to compile, run, and debug a C#
application.

Module 3, “Using Value-Type Variables,”describes how to use value-type


variables in C#. This module explains how to specify the type of data that
variables will hold, how to name variables according to standard naming
conventions, how to assign values to variables, and how to convert existing
variables from one data type to another. After completing this module, you will
be able to use value-type variables in C#.
Module 4, “Statements and Exceptions,”explains how to use some common
statements in C#. This module also describes how to implement exception
handling in C#. After completing this module, you will be able to throw and
catch errors.
Module 5, “Methods and Parameters,”describes how to create static methods
that take parameters and return values, how to pass parameters to methods in
different ways, and how to declare and use overloaded methods. After
completing this module, you will be able to use methods and parameters.
Introduction 5

Course Outline (continued)

n Module 6: Arrays
n Module 7: Essentials of Object-Oriented Programming
n Module 8: Using Reference-Type Variables
n Module 9: Creating and Destroying Objects
n Module 10: Inheritance in C#

Module 6, “Arrays,”explains how to group data into arrays. After completing


this module, you will be able to create, initialize, and use arrays.
Module 7, “Essentials of Object-Oriented Programming,”explains the
terminology and concepts required to create and use classes in C#. This module
also explains abstraction, encapsulation, inheritance, and polymorphism. After
completing this module, you will be able to explain some of the common
concepts of object-oriented programming.
Module 8, “Using Reference-Type Variables,”describes how to use reference-
type variables in C#. This module explains a number of reference types, such as
string, that are built into the C# language and the Common Language Runtime.
After completing this module, you will be able to use reference-type variables
in C#.
Module 9, “Creating and Destroying Objects,”explains what happens in the
language runtime when an object is created and how to use constructors to
initialize objects. This module also explains what happens when an object is
destroyed and how the garbage collector reclaims memory. After completing
this module, you will be able to create and destroy objects in C#.
Module 10, “Inheritance in C#,”explains how to derive a class from a base
class. This module also explains how to implement methods in a derived class
by defining them as virtual methods in the base class and overriding or hiding
them in the derived class, as required. This module explains how to seal a class
so that it cannot be derived from and how to implement interfaces and abstract
classes. After completing this module, you will be able to use inheritance in C#
to derive classes and to define virtual methods.
6 Introduction

Course Outline (continued)

n Module 11: Aggregation, Namespaces, and Advanced


Scope
n Module 12: Operators, Delegates, and Events
n Module 13: Properties and Indexers
n Module 14: Attributes

Module 11, “Aggregation, Namespaces, and Advanced Scope,”describes how


to group classes together into larger, higher-level classes and how to use
namespaces to group classes together inside named spaces and to create logical
program structures beyond individual classes. This module also explains how to
use assemblies to group collaborating source files together into a reusable,
versionable, and deployable unit. After completing this module, you will be
able to make code accessible at the component or assembly level.
Module 12, “Operators, Delegates, and Events,”explains how to define
operators and how to use delegates to decouple a method call from a method
implementation. It also explains how to add event specifications to a class.
After completing this module, you will be able to implement operators,
delegates, and events.

Module 13, “Properties and Indexers,”explains how to create properties to


encapsulate data within a class and how to define indexers to gain access to
classes by using array-like notation. After completing this module, you will be
able to use properties to enable field- like access and indexers to enable array-
like access.
Module 14, “Attributes,” describes the purpose of attributes and the role they
play in C# applications. This module explains attribute syntax and how to use
some predefined attributes in the .NET environment. After completing this
module, you will be able to create custom user-defined attributes and use these
custom attributes to query attribute information at run time.
Appendix A, “Resources for Further Study,” serves as a reference that you can use after attending the course for further study and to help
y ou locate the latest news and information about C# and the .NET Framework.

Note The information in this course is based on the Beta 1 prerelease version
of Microsoft Visual Studio.NET.
Introduction 7

Microsoft Certified Professional Program

http://www.microsoft.com/trainingandservices/

The Microsoft Certified Professional program includes the following


certifications:
n Microsoft Certified Systems Engineer + Internet (MCSE + Internet)
n Microsoft Certified Systems Engineer (MCSE)
n Microsoft Certified Database Administrator (MCDBA)
n Microsoft Certified Solution Developer (MCSD)
n Microsoft Certified Professional + Site Building (MCP + Site Building)
n Microsoft Certified Professional + Internet (MCP + Internet)
n Microsoft Certified Professional (MCP)
n Microsoft Certified Trainer (MCT)

For More Information See the “Certification”section of the Web page provided
on the compact disc or the Microsoft Training and Certification Web site at
http://www.microsoft.com/trainingandservices/
You can also send e-mail to mcp@msprograms.com if you have specific
certification questions.
8 Introduction

Exam Preparation Guides


To help prepare for the MCP exams, you can use the preparation guides that are
available for each exam. Each Exam Preparation Guide contains exam-specific
information, such as a list of the topics on which you will be tested. These
guides are available on the Microsoft Certified Professional Web site at
http://www.microsoft.com/trainingandservices/

Important MSDN Training curriculum helps you to prepare for Microsoft


Certified Professional (MCP) exams. However, no one-to-one correlation exists
between MSDN Training courses and MCP exams. Passing MCP exams
requires real-world experience with the products— MSDN Training courses
help get you started.
Introduction 9

Facilities
Class Hours

Building Hours Phones

Parking Messages

Rest Rooms Smoking

Meals Recycling
THIS PAGE INTENTIONALLY LEFT BLANK
Module 1: Overview of
the Microsoft .NET
Platform
Contents

Overview 1
Introduction to the .NET Platform 2
Overview of the .NET Framework 4
Benefits of the .NET Framework 5
The .NET Framework Components 7
Languages in the .NET Framework 13
Review 14

This course is based on the prerelease Beta 1 version of Microsoft® Visual Studio .NET.
Content in the final release of the course may be different from the conten t included in
this prerelease version. All labs in the course are to be completed with the Beta 1 version
of Visual Studio .NET.
Information in this document is subject to change without notice. The names of companies,
products, people, characters, and/or data mentioned herein are fictitious and are in no way intended
to represent any real individual, company, product, or event, unless otherwise noted. Complying
with all applicable copyright laws is the responsibility of the user. No part of this document may
be reproduced or transmitted in any form or by any means, electronic or mechanical, f or any
purpose, without the express written permission of Microsoft Corporation. If, however, your only
means of access is electronic, permission to print one copy is hereby granted.

Microsoft may have patents, patent applications, trademarks, copyright s, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.

 2001 Microsoft Corporation. All rights reserved.

Microsoft, ActiveX, BizTalk, IntelliSense, JScript, Microsoft Press, MSDN, PowerPoint, Visual
Basic, Visual C++, Visual #, Visual Studio, Windows, and Windows Media are either registered
trademarks or trademarks of Microsoft Corporation in the U.S.A. and/or other countries.

Other product and company names mentioned herein may be the trademarks of their respective
owners.
Module 1: Overview of the Microsoft .NET Platform 1

Overview

n Introduction to the .NET Platform


n Overview of the .NET Framework
n Benefits of the .NET Framework
n The .NET Framework Components
n Languages in the .NET Framework

The Microsoft® .NET platform provides all of the tools and technologies that
you need to build distributed Web applications. It exposes a language-
independent, consistent programming model across all tiers of an application
while providing seamless interoperability with, and easy migration from,
existing technologies. The .NET platform fully supports the Internet’s platform-
neutral, standards-based technologies, including HTTP, Extensible Markup
Language (XML), and Simple Object Access Protocol (SOAP).
C# is a new language specifically designed for building applications in
the .NET environment. As a developer, you will find it useful to understand the
rationale and features that provide the foundation for the .NET platform before
you start writing C# code.
After completing this module, you will be able to:
n Describe the .NET platform.
n List the main elements of the .NET platform.
n Explain the language support in the .NET Framework.
n Describe the .NET Framework and its components.
2 Module 1: Overview of the Microsoft .NET Platform

Introduction to the .NET Platform

Internet
Visual Studio.NET
Orchestration
Internet .NET Building
.NET
Enterprise Block
Framework COM+ Services
Servers

Windows

Available With .NET New


Today Enhancements Capabilities

The .NET platform is made up of several core technologies as shown on the


slide. These technologies are described in the following topics.

The .NET Framework


The .NET Framework is based on a new Common Language Runtime. The
Common Language Runtime provides a common set of services for projects
built in Microsoft Visual Studio.NET, regardless of the language. These
services provide key building blocks for applications of any type, across all
application tiers.
Microsoft Visual Basic ®, Microsoft Visual C++®, and other Microsoft
programming languages have been enhanced to take advantage of these services.
Third-party languages that are written for the .NET platform also have access to
the same services. The .NET Framework is explained in greater detail later in
this module.

The .NET Building Block Services


The .NET building block services are distributed programmable services that
are available both online and offline. A service can be invoked on a stand-alone
computer not connected to the Internet, provided by a local server running
inside a company, or accessed by means of the Internet. Microsoft .NET
building block services can be used from any platform that supports SOAP.
Microsoft Windows-based clients are optimized to distribute Web Services to
every kind of device. Services include identity, notification and messaging,
personalization, schematized storage, calendar, directory, search, and software
delivery.
Module 1: Overview of the Microsoft .NET Platform 3

The .NET Enterprise Servers


The .NET Enterprise Servers provide scalability, reliability, management,
integration within and across organizations, and many other features, as
described in the following table.
Server Description
Microsoft SQL Server™ Includes rich XML functionality, support for Worldwide Web Consortium (W3C)
2000 standards, the ability to manipulate XML data by using Transact SQL (T-SQL), flexible
and powerful Web-based analysis, and secure access to your data over the Web by using
HTTP.
Microsoft BizTalk™ Provides enterprise application integration (EAI), business-to-business integration, and
Server 2000 the advanced BizTalk Orchestration technology to build dynamic business processes
that span applications, platforms , and organizations over the Internet.
Microsoft Host Integration Provides the best way to embrace Internet, intranet, and client/server technologies while
Server 2000 preserving investments in existing earlier systems.
Microsoft Exchange 2000 Builds on the powerful Exchange messaging and collaboration technology by
Enterprise Server introducing several important new features, and further increasing the reliability,
scalability, and performance of its core architecture. Other features enhance the
integration of Exchange 2000 with Microsoft Windows 2000, Microsoft Office 2000,
and the Internet.
Microsoft Application Provides a deployment and management tool for high-availability Web applications.
Center 2000
Microsoft Internet Security Provides secure, fast, and manageable Internet connectivity. Internet Security and
and Acceleration Server Acceleration Server integrate an extensible, multilayer enterprise firewall and a scalable
2000 high-performance Web cache. It builds on Windows 2000 security and directory for
policy-based security, acceleration, and management of internetworking.
Microsoft Commerce Provides an application framework, sophisticated feedback mechanisms, and analytical
Server 2000 capabilities.

Visual Studio.NET
Visual Studio.NET provides a high-level development environment for building
applications on the .NET Framework. It provides key enabling technologies to
simplify the creation, deployment, and ongoing evolution of secure, scalable,
highly available Web applications and Web Servic es.

Windows
The next generation of Microsoft Windows® will provide the foundation for
developers who want to create new .NET applications and services.
4 Module 1: Overview of the Microsoft .NET Platform

Overview of the .NET Framework

Visual
C++ C# JScript® …
Basic
Basic

Visual Studio.NET
Common Language Specification

.NET Framework

Before COM, applications were completely separate entities with little or no


integration. By using COM, you can integrate components within and across
applications by exposing common interfaces. However, as a developer, you
must still write the code to wrap, manage, and clean up after components and
objects.

Building Components in the .NET Framework


In the .NET Framework, components are built on a common foundation. You
no longer need to write the code to allow objects to interact directly with each
other. In addition, you no longer need to write component wrappers in the .NET
environment, because components do not use wrappers. The .NET Framework
can interpret the constructs that developers are accustomed to using in object-
oriented languages. The .NET Framework fully supports class, inheritance,
methods, properties, events, polymorphism, constructors, and other object-
oriented constructs.

The Common Language Specification


The Common Language Specification (CLS) defines the common standards to
which languages and developers must adhere if they want their components and
applications to be widely useable by other .NET languages.

Visual Studio.NET
In the .NET Framework, Visual Studio.NET provides the tools you can use for
rapid application development.
Module 1: Overview of the Microsoft .NET Platform 5

Benefits of the .NET Framework

n Based on Web Standards and Practices


n Designed Using Unified Application Models
n Easy for Developers to Use
n Extensible Classes

In this topic, you will learn about some of the benefits of the .NET Framework.
The NET Framework was designed to meet the following goals.
n Based on Web standards and practices
The .NET Framework fully supports the existing Internet technologies
including Hypertext Markup Language (HTML), XML, SOAP,
Extensible Stylesheet Language for Transformations (XSLT), Xpath, and
other Web standards. The .NET Framework favors loosely connected,
stateless Web services.
n Designed using unified application models
A .NET class’s functionality is available from any .NET language or
programming model.

.NET
Framework

Visual Basic MFC/ATL ASP


Forms

Windows API
6 Module 1: Overview of the Microsoft .NET Platform

n Easy for developers to use


In the .NET Framework, code is organized into hierarchical namespaces and
classes. The Framework provides a common type system, referred to as the
unified type system, that is used by any .NET language. In the unified type
system, all languages elements are objects. There are no variant types, there
is only one string type, and all string data is Unicode. The unified type
system is described in more detail in later modules.
n Extensible classes
The hierarchy of the .NET Framework is not hidden from the developer.
You can access and extend .NET classes (unless they are sealed) through
inheritance. You can also implement cross-language inheritance.
Module 1: Overview of the Microsoft .NET Platform 7

u The .NET Framework Components

Web User
Services
Services Interface

ADO.NET: Data & XML


Base Class Library
Visual Studio.NET
Orchestration
Orchestration
Common Language Runtime
Internet .NET
.NET Building
Enterprise Block
Block
Framework COM+ Services
Servers

Windows

In this section, you will learn about Microsoft’s .NET Framework. The .NET
Framework is a set of technologies that form an integral part of the
Microsoft .NET platform. It provides the basic building blocks for developing
Web applications and Web services.
This section includes the following topics:
n Common Language Runtime
n Base Class Library
n ADO.NET: Data and XML
n Web Forms and Services
n User Interface
8 Module 1: Overview of the Microsoft .NET Platform

Common Language Runtime

Base Class Library


Library Support
Support

Thread Support
Support COM Marshaler
Marshaler

Type Checker Exception


Exception Manager

Security
Security Engine Debug Engine
Engine

MSIL to Native Code


Code Garbage
Compilers Manager Collector

Class Loader
Loader

The Common Language Runtime simplifies application development, provides


a robust and secure execution environment, supports multiple languages, and
simplifies application deployment and management. The environment is also
referred to as a managed environment, one in which common services, such as
garbage collection and security, are automatically provided. The Common
Language Runtime features are described in the following table.
Component Description
Class loader Manages metadata, as well as the loading and layout of classes.
Microsoft intermediate language Converts MSIL to native code (Just-in-Time).
(MSIL) to native compiler
Code manager Manages code execution.
Garbage collector (GC) Provides automatic lifetime management of all of your objects. This is a
multiprocessor, scalable garbage collector.
Security engine Provides evidence-based security, based on the origin of the code in addition to
the user.
Debug engine Allows you to debug your application and trace the execution of code.
Type checker Will not allow unsafe casts or uninitialized variables. MSIL can be verified to
guarantee type safety.
Exception manager Provides structured exception handling, which is integrated with Windows
Structured Exception Handling (SEH). Error reporting has been improved.
Thread support Provides classes and interfaces that enable multithreaded programming.
COM marshaller Provides marshalling to and from COM.
Base Class Library (BCL) support Integrates code with the runtime that supports the BCL.
Module 1: Overview of the Microsoft .NET Platform 9

Base Class Library

System
Collections IO Security
Security Runtime
Configuration
Base Class Library
Net
Diagnostics Reflection Text
Globalization Resources
Resources Threading

The Base Class Library (BCL) exposes features of the runtime and provides
other high-level services that every programmer needs through namespaces. For
example, the System.IO namespace contains input/output (I/O) services.
In the System.IO namespace, all of the base data types, such as int and float,
are defined for the platform. Inside the System.IO namespace, there are other
namespaces that provide various runtime features. The Collections namespace
provides sorted lists, hash tables, and other ways to group data. The IO
namespace provides file I/O, streams, and so on. The Net namespace provides
Transmission Control Protoc ol/Internet Protocol (TCP/IP) and sockets support.
For more information about namespaces, search for “namespaces”in the .NET
Framework SDK Help documents.
10 Module 1: Overview of the Microsoft .NET Platform

ADO.NET: Data and XML

ADO.NET: Data & XML

System.Data System.XML
System.XML

ADO SQL XSLT


XSLT
Serialization
Design SQLTypes
SQLTypes XPath

ADO.NET is the next generation of ActiveX® Data Object (ADO) technology.


ADO.NET provides improved support for the disconnected programming
model. It also provides rich XML support.

System.Data Namespace
The System.Data namespace consists of classes that constitute the ADO.NET
object model. At a high level, the ADO.NET object model is divided into two
layers: the connected layer and the disconnected layer.
The System.Data namespace includes the DataSet class, which represents
multiple tables and their relations. These DataSets are completely self-
contained data structures that can be populated from a variety of data sources.
One data source could be XML, another could be OLEDB, and a third data
source could be the direct adapter for SQL Server.

System.Xml Namespace
The System.Xml namespace provides support for XML. It includes an XML
parser and a writer, which are both W3C-compliant. The Extensible Stylesheet
Language (XSL) transformation is provided by the XSLT namespace. The
implementation of XPath allows data graph navigation in XML. The
Serialization namespace provides the entire core infrastructure for Web
Services, including features such as moving back and forth from objects to an
XML representation.
Module 1: Overview of the Microsoft .NET Platform 11

Web Forms and Services

ASP.NET
System.Web
Services UI
UI
Description
Description HtmlControls
HtmlControls
Discovery
Discovery WebControls
WebControls

Protocols
Protocols

Caching Security
Configuration SessionState

Microsoft ASP.NET is a programming framework built on the Common


Language Runtime that can be used on a server to build powerful Web
Applications. ASP.NET Web Forms provide an easy and powerful way to build
dynamic Web user interfaces (UIs). ASP.NET Web Services provide the
building blocks for constructing distributed Web-based applications. Web
Services are based on open Internet standards, such as HTTP and XML.
The Common Language Runtime provides built-in support for creating and
exposing Web Services by using a programming abstraction that is consistent
and familiar to both ASP Web Forms and Visual Basic developers. The
resulting model is both scalable and extensible. This model is based on open
Internet standards (HTTP, XML, SOAP, SDL) so that it can be accessed and
interpreted by any client or Internet-enabled device. Some of the more common
ASP.NET classes are described in this topic as follows:

System.Web
In the System.Web namespace, there are lower-level services such as caching,
security, configuration, and others that are shared between Web Services and
Web user interface (UI).

System.Web.Services
The System.Web.Services classes handle Web services such as protocols and
discovery.

System.Web.UI
The System.Web.UI namespace provides two classes of controls: HTML
controls and Web controls. The HTMLControls give you direct mapping of
HTML tags, such as input. There are also WebControls that allow you to
structure controls with templates (for example, a grid control).
12 Module 1: Overview of the Microsoft .NET Platform

User Interface for Windows

System.WinForms

Design ComponentModel
ComponentModel

System.Drawing

Drawing2D
Drawing2D Printing
Printing

Imaging Text
Text

System.WinForms Classes
You can use the System.WinForms classes to build the client user interface
(UI). This class lets you implement the standards Windows UI in your .NET
applications.

System.Drawing Classes
You can use the System.Drawing class to access the new GDI+ features. This
class provides support for the next generation of Graphics Device Interface
(GDI) two-dimensional graphics. It also provides native support for Graphics
Interchange Format (GIF), Tagged Image File Format (TIFF), and other formats.
Module 1: Overview of the Microsoft .NET Platform 13

Languages in the .NET Framework

n C# – Designed for .NET


New component-oriented language
n Managed Extensions to C++
Enhanced to provide more power and control
n Visual Basic.NET
New version of Visual Basic with substantial language innovations
n JScript.NET
New version of JScript that provides improved performance and
productivity
n Third-party Languages

The .NET Framework provides support for several programming languages. C#


is the programming language specifically designed for the .NET platform, but
C++ and Visual Basic have also been upgraded to fully support the .NET
Framework.
Language Description
C# C# was designed for the .NET platform and is the first modern component–oriented
language in the C and C++ family. It can be embedded in ASP.NET pages. Some of the
key features of this language include classes, interfaces, delegates, boxing and
unboxing, namespaces, properties, indexers, events, operator overloading, versioning,
attributes, unsafe code, and XML documentation generation. No header or Interface
Definition Language (IDL) files are needed.
Managed Extensions to The managed C++ is a minimal extension to the C++ language. This extension provides
C++ access to the .NET Framework that includes garbage collection, single-implementation
inheritance, and multiple-interface inheritance. This upgrade also eliminates the need to
write “plumbing” code for components. It offers low-level access where useful.
Visual Basic.NET Visual Basic.NET provides substantial language innovations over previous versions of
Visual Basic. Visual Basic.NET supports inherit ance, constructors, polymorphism,
constructor overloading, structured exceptions, stricter type checking, free threading,
and many other features. There is only one form of assignment? no Let or Set methods.
There are new Rapid Application Development (RAD) features such as XML Designer,
Server Explorer, and Web Forms designer available from Visual Studio.NET to Visual
Basic. With this release, Visual Basic Scripting Edition provides full Visual Basic
functionality.
Microsoft JScript.NET JScript.NET is rewritten to be fully .NET aware. It includes support for classes,
inheritance, types, and compilation. It provides improved performance and productivity
features. JScript.NET is also integrated with Visual Studio.NET. You can take
advantage of any .NET Framework class in JScript.NET.
Third-party languages Several third-party languages are supporting the .NET platform. These languages
include APL, COBOL, Pascal, Eiffel, Haskell, ML, Oberon, Perl, Python, Scheme, and
SmallTalk.
14 Module 1: Overview of the Microsoft .NET Platform

Review

n Introduction to the .NET Platform


n Overview of the .NET Framework
n Benefits of the .NET Framework
n The .NET Framework Components
n Languages in the .NET Framework

1. What is the .NET platform?

2. What are the core technologies in the .NET platform?

3. List the components of the .NET Framework.

4. What is the purpose of Common Language Runtime?


Module 1: Overview of the Microsoft .NET Platform 15

5. What is the purpose of Common Language Specification?

6. What is a Web Service?

7. What is a managed environment?


THIS PAGE INTENTIONALLY LEFT BLANK
Module 2: Overview of
C#

Contents

Overview 1
Structure of a C# Program 2
Basic Input/Output Operations 9
Recommended Practices 15
Compiling, Running, and Debugging 22
Lab 2: Creating a Simple C# Program 36
Review 45

This course is based on the prerelease Beta 1 version of Microsoft® Visual Studio .NET.
Content in the final release of the course may be different from the content included in
this prerelease version. All labs in the course are to be completed with the Beta 1
version of Visual Studio .NET.
Information in this document is subject to change without notice. The names of companies,
products, people, characters, and/or data mentioned herein are fictitious and are in no way intended
to represent any real individual, company, product, or event, unless otherwise noted. Complying
with all applicable copyright laws is the responsibility of the user. No part of this document may
be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose, without the express written permission of Microsoft Corporation. If, however, your only
means of access is electronic, permission to print one copy is hereby granted.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.

 2001 Microsoft Corporation. All rights reserved.

Microsoft, ActiveX, BizTalk, IntelliSense, JScript, Microsoft Press, MSDN, PowerPoint, Visual
Basic, Visual C++, Visual #, Visual Studio, Windows, and Windows Media are either registered
trademarks or trademarks of Microsoft Corporation in the U.S.A. and/or other countries.

Other product and company names mentioned herein may be the trademarks of their respective
owners.
Module 2: Overview of C# 1

Overview

n Structure of a C# Program
n Basic Input/Output Operations
n Recommended Practices
n Compiling, Running, and Debugging

In this module, you will learn about the basic structure of a C# program by
analyzing a simple working example. You will learn how to use the Console
class to perform some basic input and output operations. You will also learn
about some best practices for handling errors and documenting your code.
Finally, you will compile, run, and debug a C# program.
After completing this module, you will be able to:
n Explain the structure of a simple C# program.
n Use the Console class of the System namespace to perform basic
input/output operations.
n Handle exceptions in a C# program.
n Generate Extensible Markup Language (XML) documentation for a C#
program.
n Compile and execute a C# program.
n Use the debugger to trace program execution.
2 Module 2: Overview of C#

u Structure of a C# Program

n Hello, World
n The Class
n The Main Method
n The using Directive and the System Namespace
n Demonstration: Using Visual Studio to Create
a C# Program

In this section, you will learn about the basic structure of a C# program. You
will analyze a simple program that contains all of the essential features. You
will also learn how to use Microsoft® Visual Studio ® to create and edit a C#
program.
Module 2: Overview of C# 3

Hello, World

using
using System;
System;

class
class Hello
Hello
{{
public
public static
static int
int Main(
Main( ))
{{
Console.WriteLine("Hello,
Console.WriteLine("Hello, World");
World");
return
return 0;
0;
}}
}}

The first program most people write when learning a new language is the
inevitable Hello, World. In this module, you will get a chance to examine the
C# version of this traditional first program.
The example code on the slide contains all of the essential elements of a C#
program, and it is easy to test! When executed from the command line, it
simply displays the following:

Hello, World

In the following topics, you will analyze this simple program to learn more
about the building blocks of a C# program.
4 Module 2: Overview of C#

The Class

n A C# Application Is a Collection of Classes, Structures,


and Types
n A Class Is a Set of Data and Methods
n Syntax
class
class name
name
{{
...
...
}}
n A C# Application Can Consist of Many Files

n A Class Cannot Span Multiple Files

In C#, an application is a collection of one or more classes, data structures, and


other types. In this module, a class is defined as a set of data combined with
methods (or functions) that can manipulate that data. In later modules, you will
learn more about classes and all that they offer to the C# programmer.
When you look at the code for the Hello, World application, you will see that
there is a single class called Hello. This class is introduced by using the
keyword class. Following the class name is an open brace ({). Everything up to
the corresponding closing brace (}) is part of the class.

You can spread the classes for a C# application across one or more files. You
can put multiple classes in a file, but you cannot span a single class across
multiple files.

Note for Java developers The name of the application file does not need to be
the same as the name of the class.

Note for C++ developers C# does not distinguish between the definition and the
implementation of a class in the same way that C++ does. There is no concept
of a definition (.hpp) file. All code for the class is written in one file.
Module 2: Overview of C# 5

The Main Method

n When Writing Main, You Should:


l Use an uppercase “M,” as in “Main”
l Designate one Main as the entry point to the program
l Declare Main as public static int Main
n Multiple Classes Can Have a Main
n When Main Finishes, or Returns, the Application Quits

Every application must start somewhere. When a C# application is run,


execution starts at the method called Main. If you are used to programming in
C, C++, or even Java, you are already familiar with this concept.

Important The C# language is case sensitive. Main must be spelled with an


uppercase "M" and with the rest of the name in lowercase.

Although there can be many classes in a C# application, there can only be one
entry point. It is possible to have multiple classes each with Main in the same
application, but only one Main will be executed. You need to specify which
one should be used when the application is compiled.
The signature of Main is important too. If you use Visual Studio, it will be
created automatically as public static int. (You will learn what these mean later
in the course.) Unless you have a good reason, you should not change the
signature.

Tip You can change the signature to some extent, but it must always be static,
otherwise it might not be recognized as the application’s entry point by the
compiler.

The application runs either until the end of Main is reached or until a return
statement is executed by Main.
6 Module 2: Overview of C#

The using Directive and the System Namespace

n The .NET Framework Provides Many Utility Classes


l Organized into namespaces
n System Is the Most Commonly Used Namespace
n Refer to Classes by Their Namespace
System.Console.WriteLine("Hello,
System.Console.WriteLine("Hello, World");
World");
n The using Directive
using
using System;
System;
……
Console.WriteLine("Hello,
Console.WriteLine("Hello, World");
World");

As part of the Microsoft .NET Framework, C# is supplied with many utility


classes that perform a range of useful operations. These classes are organized
into namespaces. A namespace is a set of related classes. A namespace may
also contain other namespaces.
The .NET Framework is made up of many namespaces, the most im portant of
which is called System . The System namespace contains the classes that most
applications use for interacting with the operating system. The most commonly
used classes handle input and output (I/O). As with many other languages, C#
has no I/O capability of its own and therefore depends on the operating system
to provide a C# compatible interface.

You can refer to objects in namespaces by prefixing them explicitly with the
identifier of the namespace. For example, the System namespace contains the
Console class, which provides several methods, including WriteLine. You can
access the WriteLine method of the Console class as follows:
System.Console.WriteLine("Hello, World");

However, using a fully qualified name to refer to objects can be unwieldy and
error prone. To ease this burden, you can specify a namespace by placing a
using directive at the beginning of your application before the first class is
defined. A using directive specifies a namespace that will be examined if a
class is not explicitly defined in the application. You can put more than one
using directive in the source file, but they must all be placed at the beginning of
the file.
Another Random Document on
Scribd Without Any Related Topics
"What of Mr. Joyce, in connection with the subject on which we
were talking, Mr. Benthall?" asked Maude.

And then Mr. Benthall told them all he had heard from Mrs. Covey.

Gertrude went alone with Mr. Benthall to the gate, and they were
a very long time saying their adieux. When she came back to the
house, she found her sister in the hall.

"You found the gate very difficult to open, Gerty!" said Maude,
with her grave smile.

"Yes, dear, very difficult! Do you know, dear,--he hasn't said


anything, but I think Mr. Benthall is going to ask me to be his wife!"

"Well, Gerty, and what then?"

"Then I shall have a home to offer you, my darling! a home where


we can be together, and needn't be under the rule of that beautiful,
superior creature!"

CHAPTER XXV.

CLOUDING OVER.

Gertrude Creswell was not wrong in her supposition that Mr.


Benthall intended asking her to become his wife. It is not often that
mistakes are made in such matters, despite all we read of
disappointed maidens and blighted hopes. Life is so very practical in
this portion of the nineteenth century, that, except in very rare
cases, even love-affairs scarcely care to avail themselves of a halo of
romance, of that veil of mystery and secrecy which used to be half
the charm of the affair. "The bashful virgin's sidelong looks of love"
are now never seen, in anything like good society, where the
intention of two young persons to marry as soon as--sometimes
before--they have met, and the "understanding" between them is
fully recognised by all their friends; while as to the "matron's glance
which would such looks reprove," it is entirely obsolete, and never
brought into play, save when the bashful virgins bend their sidelong
looks of love on good-looking young paupers in the government
offices or the army--a proceeding which it is but fair to say the
bashful virgins "of the period" very rarely indulge in. Gertrude
Creswell was as unlike a "girl of the period," in the present delightful
acceptation of that phrase, as can well be imagined; that is to say,
she was modest, frank, simple, honest, and without guile; but she
was a woman, and she knew perfectly that she had engaged George
Benthall's attention, and become the object of his affection, although
she had had no previous experience in the matter. They had lived
such quiet lives, these young ladies, and had slid so tranquilly from
the frilled-trouser-wearing and les-graces-playing period of
childhood, to the long skirts, croquet, and flirtation of marriageable
age, that they had hardly thought of that largest component part of
a girl's day-dream, settling in life. There was with them no trace of
that direct and unmistakable line of demarcation known as "coming
out"--that mountain-ridge between the cold dreary Switzerland of
lessons, governesses, midday dinner, back-board, piano practice, and
early bed, and the lovely glowing Italy of balls, bouquets, cavaliers,
croquet, Park, Row, crush-room, country-house, French novel, and
cotillon at five a.m. So Gertrude had never had a love-affair of any
kind before; but she was very quiet about it, and restrained her
natural tendency to gush, principally for Maude's sake. She thought
it might seem unkind in her to make a fuss, as she described it,
about her having a lover before Maude, who was as yet unsuited
with that commodity. It puzzled Gertrude immensely, this fact of her
having proved attractive to any one while Maude was by; she was
accustomed to think so much of her elder sister, on whom she had
endeavoured to model herself to the best of her ability, that she
could not understand any one taking notice of her while her sister
was present. Throughout her life, with her father, with her mother,
and now with her uncle, Gertrude Creswell had always played the
inferior part to her sister; she was always the humble confidante in
white muslin to Maude in Tilburina's white satin, and in looks,
manner, ability, or disposition, was not imagined to be able to stand
any comparison with the elder girl.

But Mr. Benthall, preferring Gertrude, had given long and serious
thought as to his future. He had taken the trouble to do something
which he knew he ought to have done long since, but which he had
always resolutely shirked--to look into the actual condition of his
school, and more especially of his boarders; and after careful
examination, he confessed to himself, as he smoked a costly cigar,
pacing slowly up and down the lane, which was ablaze with apple-
blossom--it would never have done to have been caught in the wildly
dissipated act of smoking by any of the boys, or, indeed, by a good
many of the villagers--he confessed to himself that he wanted a
companion, and his establishment wanted a head, and that Mrs.
Covey, excellent in her way, was scarcely a proper representative of
the female element in the household of the head-master of
Helmingham school. Thus minded, Mr. Benthall rode over to
Woolgreaves, was received by a benevolent grin from the stable-
helper, to whom he confided his horse (confound those fellows, with
what an extraordinary facility they blunder on to the right scent in
these matters!), went into the house, paid his suit to the two young
ladies, had but a few words with Miss Maude, whose services, in
consequence of an unfavourable turn of Mrs. Ashurst's illness, were
required upstairs, and a prolonged interview of a very satisfactory
kind with Miss Gertrude. With a portion only of this interview have
we to do; the remaining portion can be much "more easily imagined
than described," at least, by those to whom the circumstances of the
position have been, or actually are, familiar--perhaps no
inconsiderable proportion of the world.
"By the way," said Mr. Benthall, as, after a third ridiculous attempt
at pretending he was going, he had again settled himself in his chair,
but had not thought it necessary to give up Miss Gertrude's hand,
which he had taken in his own when he had last risen to say adieu--
"by the way, Miss--well, Gertrude--what was that you were saying
last time I was here about Mrs. Creswell?"

"What I was saying about Mrs. Creswell? I don't exactly know, but
it wouldn't be very difficult to guess! I hate her!" said Gertrude
roundly.

"Ah, yes!" said Mr. Benthall, "I think I managed to gather that
from the general tone of your conversation; but what were you
saying specifically?"

"I don't know what specifically means, I think!" said Gertrude,


after a moment's reflection; "but I do know why I hate her!"

"And that is because----"

"Because she pretends to be so awfully superior, and goes in to


be so horribly good and demure, and all that kind of thing," said
Miss Gertrude, growing very becomingly red with excitement. "She
always reminds me of the publican in the parable, who, 'standing
afar off'--you know what I mean! I always thought that the publican
went in to draw more attention to himself by his mock humility than
all the noise and outcry which the Pharisee made, and which any
one would have put down to what it was worth; and that's just like
Miss A.--I mean Mrs. Creswell--I'm sure I shall call her Miss A. to my
dying day, Maude and I are so accustomed to speak of her like that--
you'd think butter wouldn't melt in her mouth; and this is so
shocking, and that is so dreadful, and she is so prim, and so
innocent, and so self-sacrificing; and then she steps in and carries
off our uncle, for whom all the unmarried girls in the county were
angling years ago, and had given up the attempt in despair!"
"But you must have seen all this in her for months, over since she
has been in the same house with you. And yet it is only since she
achieved her conquest of your uncle that you've been so bitter
against her."

"Not at all, George. That's so like a man, always to try and say an
unpleasant thing about the want of generosity, and all that. Not at
all! I don't mind so much about her marrying uncle; if he's such a
silly old thing as to like to marry her, that's his look-out, and not
ours. And I've no doubt she'll make him what people call a good
wife, awfully respectable, and all that kind of thing. And I don't
believe she's ever been in love with anybody else, notwithstanding
your stories about that Mr. Joyce. I like your talking about women's
gossip, sir; a fine story that was you brought us, and all started by
some old woman, wasn't it? But what annoyed me worst was the
way in which she wrote about making Maude give up her music-
room. I call that regularly cruel, because she knew well enough that
Maude was awfully fond of that room, and--and that's what makes
me hate her!"

"And Maude seemed to think that that was to be but the


beginning of a series of unpleasant measures."

"Well, you know Maude's blood is regularly up in this matter, and


of course she is prejudiced to a certain extent, and I don't know--I'm
not clever, you know, like she is--how far she's right. But I think
plainly enough that Miss A.--I mean Mrs. Creswell--intends to have
her own way in everything; and as she doesn't like us, and never
did, she'll set much against us, and goodness knows the result!"

Mr. Benthall could not have been described as "goodness," nor


was he a particularly far-seeing man, but he thought he knew the
result. As he cantered slowly home that afternoon, he thought the
matter out, and came to the conclusion that if Mrs. Creswell were
the woman she was described, she would tolerate but for a very
little time the presence of two persons so obnoxious in the same
house with her, and that when that climax arrived, it was the time
for the Rev. George Benthall to step in and do himself and
everybody else concerned a good turn by taking Gertrude off her
uncle's hands.

There was very little doubt that the shelter of the Woolgreaves
roof and the luxuries of the Woolgreaves establishment would be
required by one of its inmates for but a very short time. Mrs.
Ashurst's strength, which had been gradually declining, began to fail
her altogether, and it was evident to all that the end was at hand.
Dr. Osborne, who was in constant attendance--and the little man
never showed to such advantage as under the most trying
professional circumstances--shook his head sadly, and confessed
that it had now become a question of days. But the old lady was so
tranquil, and apparently so happy, that he hesitated to summon her
daughter, more especially as the newly married couple were so soon
expected home. The girl who attended on the old lady in the
capacity of night-nurse had a different experience from Dr. Osborne
so far as the tranquillity of the patient was concerned. She knew
when she was awake--and considering that she was a full-blooded,
heavy, bacon-fed lass, she really deserved much credit for the
manner in which she propped her eyelids up with her forefingers,
and resorted to sniffing instead of snoring--she knew that Mrs.
Ashurst had very disturbed nights, when she lay moaning and
groaning and plucking at the bedclothes, and constantly murmuring
one phrase; "For my sake! Lord help her! God grant it may turn out
right! She did it, I know, for my sake!" Gradually she lost
consciousness, and in her wandering state she repeated nothing but
this one phrase, "For my sake!" Occasionally she would smile
placidly, and look round the room as though in admiration of its
comfort and appointments, but then the sad look would come over
her face, and she would repeat the melancholy sentence in the
saddest of tones. Dr. Osborne, when he eventually came to hear of
this, and to witness it, confessed he could not understand it. It was
not a case for the College of Surgeons, nor getatable by the
Pharmacopoeia; it was what Shakespeare said--he'd heard his girl
read it--about not being able to minister to a mind diseased, or
something of that sort; and yet, God bless him, Mrs. Ashurst was
about the last woman to have anything of the kind. However, he
should be deuced glad when little Marian--ah, mustn't call her little
Marian now; beg pardon, Mrs. Creswell--funny, wasn't it? couldn't
get that into his head! had known 'em all so long, and never
thought--nor anybody else, for the matter of that. However, that's
neither here nor there. What's that proverb, eh?--"There's no fool
like an----" No, no, mustn't say that before him, please. What was he
saying? Oh, he should be glad when Mrs. Creswell came home, and
took her mother under her own charge.

Mr. and Mrs. Creswell came home two days before they were
expected, or rather before they had originally intended. Marian had
heard of her mother's illness, and expressed a wish to go to her at
once--a wish which of course decided Mr. Creswell's course of action.
The tenants and villagers, to whom the news of Mr. Creswell's
intended political experiment had been imparted during his absence,
had intended to give him a welcome in which they could express
their sentiments on flags and mottoes and triumphal arches; and
they had already arranged an alliterative sentence, in which
"Creswell and Conservatism!" each picked out with gigantic capital
letters, were to play conspicuous parts; but Dr. Osborne, who got
wind of what was threatened, drove off to Brocksopp in his little
pony-chaise, and there took Mr. Teesdale, the agent, into confidence,
and revealed to him the real state--hovering between life and death-
-in which Mrs. Ashurst then lay. On the reception of this information,
Mr. Teesdale took upon himself to hint that the intended
demonstration had better be postponed for a more convenient
season; and accordingly Mr. and Mrs. Creswell, arriving by the train
at Brocksopp, and having their carriage to meet them, drove through
the streets when the working-people were all engaged at their
factories and mills, and made their way home, scarcely exciting any
recognition.
The two girls, on the alert at hearing the wheels of the
approaching carriage, rushed to the door, and were honoured by
being permitted to kiss the cheek of the bride, as she swept past
them. No sooner had they kissed their uncle, and were all assembled
in the drawing-room, than Marian asked after her mother.

"I'm afraid you will find her very much changed, Mrs. Creswell,"
said Maude, who, of course, was spokeswoman. "Mrs. Ashurst is
very much weaker, and has--has occasional fits of wandering, which-
---"

"Why was I not informed of this?" asked Marian, in her chilliest


tones. "Were you both so much engaged, that you could not
manage to let me have a line to tell me of this change in my
mother's state?"

"Maude wanted to write and tell you, but Dr. Osborne wouldn't let
her," blustered out Gertrude. "She never will say anything for herself,
but I'm sure she has been most attentive, Maude has, and I don't
think----"

"I'm sorry to interrupt this lobgesang,Gertrude; but I must go up


and see my mother at once. Be good enough to open the door."
"And she sailed out of the room," Gertrude said, afterwards, "as
though she'd been a duchess! In one of those rustling silks, don't
you know, as stiff as a board, which look as if they'd stand up by
themselves!"

When Marian reached her mother's door, and was just about
entering, she stopped short, arrested by a low dull moaning sound
which fell upon her ear. She listened with her blood curdling within
her and her lips growing cold and rigid. Still it came, that low hollow
moan, monotonous, dreadful. Then she opened the door, and,
passing swiftly in, saw her mother lying tossing on the bed, plucking
furtively at the bedclothes, and moaning as she moved her head
wearily in its unrest.
"Mother!" cried Marian--"mother, darling mother don't you know
me?" And she flung herself on the bed, and, taking the old woman's
head in her arms, softly kissed her lips.

The bright, the momentarily bright, eyes looked at her without


seeing her--she knew that--and presently moved away again round
the room, as Mrs. Ashurst raised her long lean hand, and, pointing
to the wall, said, "Pictures--and books--all fine--all fine!--for my
sake!" uttering the last words in a deep hissing whisper.

Marian was too shocked to speak. Shocked, not frightened; she


had much natural strength of mind, and had had experience of
illness, though not of this character. But she was shocked to see her
mother in such a state, and deeply enraged at the fact that the
increase of the illness had been kept from her. "Don't you know
me?" she repeated; "mother, darling mother, don't you know me?
Marian, poor Marian! your daughter Marian!"

"Ah, don't blame her!" said the old woman, in the same whisper.
"Poor Marian! poor dear Marian! my Jimmy's pet! She did it for my
sake, all for my sake! Carriages and horses and wine for me--wine,
rich strong wine for me--all for me, all for my sake, poor Marian! all
for my sake!"

"Is she often in this way? Does she often repeat those horrible
words?" asked Marian of the servant, of whose presence she then,
on raising her head, became for the first time aware.

"Oh yes, miss--I mean, mum!--constantly, mum! She never says


anything else, mum, but about some things being for her sake,
mum. And she haven't said anything else, miss, since she was off
her head--I mean, since she was delirrous, mum!"

"Does she always mention my name--Marian?"

"Always, mum, 'Poor Marian'--savin' your presence, and not


meanin' a liberty--is what she do say, miss, and always about 'for her
sake' it's done, whatever it is, which I don't know."

"How long has she been like this? How long have you been with
her?"

"A week last Wednesday, mum, was when I was brought from the
laundry to be nurse; and if you find your collars and cuffs iron-
moulded, mum, or not properly got up, you'll understand it's not me,
Dr. Osbin having had me fetched here as bein' strong for nussin' and
a good sitter-up o' nights----"

"Yes, I understand!" said Marian, vacantly; "you won't have to sit


up any more; I shall relieve you of that. Just wait here; I shall be
back in a few minutes."

Marian hurried downstairs, and in the drawing-room found her


husband, the two girls, and Dr. Osborne, who had joined the party.
There must have been some peculiar expression in her face, for she
had no sooner opened the door than Mr. Creswell, looking up,
hurried across the room and took her hand, saying anxiously, "What
is the matter, Marian? what is it, my love?"

"Simply that I arrive here to find my mother wandering and


imbecile--she whom I left comparatively cheerful, and certainly in
the possession of all her senses--that is all, nothing more," said
Marian, in a hard low voice, and with a dead-white face and dried
bloodless lips. "I thought," she continued, turning to the girls, "that I
might have left her safely in your charge. I never asked for your
sympathy, God knows; I would not have had it if you had offered it
to me; but I thought you seemed to be disposed kindly and
affectionately towards her. There was so much gush and display in
your attachment, I might have known it had no real foundation."

"You have no right to speak to us in this way, Mrs. Creswell!" cried


Maude, making a step in advance and standing very stiff and erect;
"you have no right to----"
"Maude," broke in Mr. Creswell, in his coldest tone, "recollect to
whom you are speaking, if you please."

"I do recollect, uncle; I am speaking to Mrs. Ashurst's daughter--


dear Mrs. Ashurst, whom both Gertrude and I love, and have tried to
show we love her, as she would tell you, if she could, poor darling!
And it is only because Mrs. Creswell is her daughter that I answer
her at all, after her speaking to me in that way. I will tell you now,
Mrs. Creswell, what I should not otherwise have mentioned, that
Gerty and I have been constant in our attendance on Mrs. Ashurst,
and that one or other of us has always slept in the next room, to be
within call if we were wanted, and----"

"Why did you take upon yourselves to keep me in ignorance of


the change in my mother's mental state, of this fearful wandering
and unconsciousness?--that is what I complain of."

"Oh, I must not let them say they took it upon themselves at all,"
said Dr. Osborne, who had been looking on uncomfortably during
this dialogue; "that was my fault entirely; the girls wanted to send
for you, but I said no, much better not. I knew you were due home
in a few days, and your earlier arrival could not have done the least
good to my poor old friend upstairs, and would only have been
distressing to you."

"Oh, you accept the responsibility, Dr. Osborne?" said Marian, still
in the same hard voice. "Would you have acted in the same way with
any ordinary patient, any stranger?"

"Eh?" exclaimed the little doctor, in a very loud key, rubbing his
face hard with his pocket-handkerchief. "What do you ask, Marian?--
any stranger?"

"Would you have taken upon yourself to keep a daughter from


her mother under similar circumstances, supposing they had been
strangers to you?"
"No--no, perhaps not," said the little doctor, still wildly astonished.

"It will be perhaps better, then, if henceforth you put us on the


footing of strangers!" said Marian.

"Marian!" exclaimed Mr. Creswell.

"I mean what I said," she replied. "Had we been on that footing
now, I should have been at my mother's bedside some days since!"
And she walked quickly from the room.

Dr. Osborne made two steps towards his hat, seized it, clapped it
on his head, and with remarkably unsteady legs was making his way
to the door, when Mr. Creswell took him by the arm, begged him not
to think of what had just passed, but to remember the shock which
Marian had received, the suddenness with which this new phase of
her mother's illness had come upon her, etc. The little doctor did not
leave the room, as apparently he had intended at first; he sat down
on a chair close by, muttering--

"Treat her as a stranger rocked her on my knee brought her


through measles! father died in my arms treat her as a stranger!"

Two days afterwards Marian stood by the bed on which lay Mrs.
Ashurst, dead. As she reverently arranged the gray hair under the
close cap, and kissed the cold lips, she said--

"You did not enjoy the money very long, darling mother! But you
died in comfort, at any rate and that was worth the sacrifice--if
sacrifice it were!"

CHAPTER XXVI.
IN HARNESS.

It was the autumn of the year, in the spring of which Walter Joyce
had returned to London from Westhope. Six months had elapsed
since he had read what he had almost imagined to be his death-
warrant in Marian's reply to his letter containing the Berlin proposal.
It was not his death-warrant; he had survived the shock, and,
indeed, had borne the disappointment in a way that he did not think
possible when the blow first fell upon him. Under the blessed,
soothing influence of time, under the perhaps more effectual
influence of active employment, his mind had been weaned from
dwelling on that dread blank which, as he at first imagined, was to
have been his sole outlook for the future. He was young, and strong,
and impressionable; he returned to London inclined to be
misanthropical and morose, disposed to believe in the breaking of
hearts and the crushing of hopes, and the rather pleasant sensations
of despair. But after a very short sojourn in the metropolis, he was
compelled to avow to himself the wisdom of Lady Caroline
Mansergh's prognostications concerning him, and the absolute truth
of everything she had said. A life of moping, of indulgence in
preposterous cynicism and self-compassion, was not for him; he was
meant for far better things--action in the present, distinction in the
future--those were to be his aims, and after a fortnight's indolence
and moodiness, he had flung himself into the work that was awaiting
him, and begun to labour at it with all his energy and all his brain-
power.

Some little time afterwards, when Joyce thought over his mental
condition in those first days of his return to London, the cheap
cynicism, the pettishness, and the languor which he had suffered to
possess him, he wondered why old Jack Byrne, with whom he had
taken up his quarters, had not rebuked him for it, and one day, with
some considerable confusion, he asked the old man the reason.
"Why didn't I speak to you about it, and pitch into you for it, my
boy?" said the old man, with his peculiar soft laugh. "Because it's
best to let some things have their run, and come to a stop of their
own accord. I saw plainly enough what would be the result of that
love business, long ago, when you first told me of it. Why didn't I
say so then? Why, you don't imagine I should have attempted to
influence you in such a matter, when I had never even seen the lady,
and had only general experience to take as my guide? I did give you
as many hints as I thought prudent or decent in a letter which I
wrote to you, my lad; but you didn't seem to profit by them much,
or, indeed, to take any heed of them. You went sailing away straight
and smoothly enough until that squall came down upon you and
carried away your masts and your rigging, and left you a helpless log
tossing on the waters. It was so nice to be a helpless log, wasn't it?-
-so nice that you thought you would never be anything else. But,
God bless you, I knew differently; I'd seen the same case a hundred
times before, and I knew if you were left alone you would come all
right in time. And now you have come all right, and you're doing
your work well, and they think highly of you at the Comet office."

"I'm glad of that; that's the best news you could give me. Do they
think well of me? Do they think I do my work well, and----"

"Good Lord, what a swallow the lad has for flummery!" grumbled
old Byrne. "He'd like me to repeat every word of praise to him. It's
wonderful to see how he glows under it--no, not wonderful, when
one recollects how young he is. Ah, youth, youth! Do they? Yes, of
course they do; you know that well enough. It's deuced lucky you
gave up that notion of going to Berlin, Walter, boy."

"Yes," said Joyce, with a sigh, as he remembered all about the


proposal; "I'm better here."

"Better here, I should think you were, indeed! A correspondent


can't do much in the way of making his mark. He can be serious and
well informed, or chatty and nonsensical; he can elect between
describing the councils of cabinets or the circumference of crinolines;
but in either case his scope is limited, and he can never get much
fame for himself. Now in your present position as an essayist and
leader-writer of remarkable ability--oh, you needn't pretend to blush,
you know I shouldn't say what I didn't think--there is possibly a very
bright future in store for you! And to think that years ago you
possessed a distaste for politics!"

"It does seem ridiculous," said Walter, smiling. "I am always


amused when I remember my very wilful ignorance on such matters.
However, the credit of the conversion, if credit there be, is entirely
owing to you and O'Connor."

"Not entirely, I'm thinking," said the old man. "I recollect your
telling me of a conversation you had with Lady Caroline Mansergh, in
which certain hopes were expressed and certain suggestions made,
which, I should say, had their effect in influencing your conduct. Am
I right, Walter?" And Mr. Byrne looked hard and keenly from under
his bushy eyebrows at his young friend.

"Perfectly right!" said Walter, meeting his glance. "I think that the
remembrance of Lady Caroline's advice, and the knowledge that she
thought I had within me the power of distinguishing myself, were
the first inducements to me to shake off that horrible lethargic state
into which I had fallen!"

"Well, we must take care that you fulfil all her ladyship's
expectations, Walter! What you are doing now must merely be a
stepping-stone to something much better. I don't intend to die until I
have seen you a leader in the people's cause, my boy! Oh yes, I
allow you're soundly with them now, and fight their battles well and
effectively with the pen; but I want to live to see you in Parliament,
to hear you riddling the plutocrats with your banter, and
overwhelming the aristocrats with your scorn!"
"My dear old friend, I fear you pitch the note a little too high,"
said Joyce, with a laugh. "I don't think you will ever see me among
the senators."

"And why not?" asked old Byrne, in a very excited manner--"and


why not, pray? Is there any one speaks better at the Club? Is there
any one more popular among the leaders of the cause, or with
them? If those miserable Tories had not swallowed the leek fifty
times in succession, as they have just done, and thereby succeeded
in clinging to office for yet a few months, the chiefs of the party, or
at least of one section of it--the 'ultras,' as they are good enough to
call us--would have relied greatly on your advice and assistance, and
when the election comes, as come it must within a very short time,
you will see how you will be in requisition. And about your position,
Walter? I think we should look to that at once. I think you should
lose no time in entering yourself at some Inn of Court, and
commence reading for the bar!"

"Don't ask me to make any change in my life at present, old


friend!" said Walter. "No!" as he saw the old man with an impatient
gesture about to speak--"no, I was not going to plead the want of
the money; for, in the first place, I know you would lend it to me,
and in the second I am myself making, as you know, an excellent
income. But I don't want to undertake anything more just now than
what I am actually engaged in. I am quite sufficiently occupied--and
I am very happy."

Old Byrne was compelled to be satisfied with this declaration, but


he grumbled out that it should only be temporary, and that he
intended to see Walter in a very different position before he died.

Walter Joyce said nothing more than the truth when he said that
he was very happy. He had fallen into exactly the kind of life which
suited him, the pursuance of a congenial occupation amongst
companions of similar tastes. There are, I take it, but few of us
professional plyers of the pen who do not look back with regret and
with something akin to wonder to that halcyon time when we first
entered upon authorship; when the mere act of writing was in itself
pleasant, when the sight of a proof-sheet was calculated to fill one
with infinite delight, when one glowed with delight at praise, or
writhed in agony under attack. In after life, when the novelty has
entirely worn off, when the Pegasus which ambled, and kicked, and
pranced, has settled down into the serviceable hack of ordinary use,
often obliged, like other hacks, to go through his work and to put
forth his paces at inopportune times and seasons, it seems
impossible to believe that this freshness of feeling, this extraordinary
enthusiasm, can ever have existed; unless, perchance, you see the
reflex of yourself in some one else who is beginning to pursue the
sunny verdant end of that path which with you at present has worn
down into a very commonplace beaten track, and then you perceive
that the illusion was not specially your own, but is common to all
who are in that happy glorious season of youth.

Walter Joyce was thoroughly happy. He had pleasant rooms in


Staples Inn--a quiet, quaint, old-world place, where the houses with
their overhanging eaves and gabled roofs and mullioned windows
recall memories of Continental cities and college "quads," and yet
are only just shut off from the never-ceasing bustle and riot of
Holborn. The furniture of these rooms was not very new, and there
was not very much of it; but the sitting-room boasted not merely of
two big easy-chairs, but of several rows of bookshelves, which had
been well filled, by Jack Byrne's generosity, with books which the old
man had himself selected; and in the bedroom there was a bed and
a bath, which, in Joyce's opinion, satisfied all reasonable
expectations. Here, in the morning, he read or wrote; for he was
extending his connection with literature, and found a ready market
for his writings in several of the more thoughtful periodicals of the
day. In the afternoon he would go down to the Comet office, and
take part in the daily conference of the principal members of the
staff. There present would be Mr. Warren, the proprietor of the
paper, who did not understand much about journalism, as, indeed,
could scarcely be expected of him, seeing that the whole of his
previous life had been taken up in attending to the export provision
trade, in which he had made his fortune, but who was a capital man
of business, looked after the financial affairs of the concern, and
limited his interference with the conduct of the paper in listening to
what others had to say. There would be Mr. Saltwell, who devoted
himself to foreign politics, who was a wonderful linguist, and a skilful
theological controversialist, and who, in his tight drab trousers, cut-
away coat, and bird's-eye cravat, looked like a racing trainer or a
tout; Mr. Gowan, a Scotchman, a veteran journalist of enormous
experience, who, as he used to say, had had scores of papers "killed
under him;" Mr. Forrest, a slashing writer, but always in extremes,
and who was always put on to any subject which it was required
should be highly lauded or shamefully abused--it did not matter
much to Mr. Forrest, who was a man of the world; and Mr.
Ledingham, a man of great learning but very ponderous in style and
recondite in subject, whose articles were described by Mr. Shimmer
as being "like roast pig, very nice occasionally, but not to be
indulged in often with impunity," were also usual attendants at the
conference, which was presided over by the recognised editor of the
Comet, Terence O'Connor.

Mr. O'Connor was the type of a class of journalists which yet


exists, indeed, but is not nearly so numerous as it was a few years
ago. Your newspaper editor of to-day dines with the duke and looks
in at the countess's reception; his own reporter includes him
amongst the distinguished company which he, the reporter,
"observes" at select reunions; he rides in the Park, and drives down
to his office from the House of Commons, where he has been the
centre of an admiring circle of members, in his brougham. Shades of
the great men of bygone days--of White and Berry, of Kew and
Captain Shandon--think of that Terence O'Connor was of the old
school. He had made journalism his profession since he left Trinity,
and had only won his position by hard labour and untiring
perseverance, had written in and edited various provincial
newspapers, had served his time as sub and hack on the London
press, and had eventually risen to the editorial chair which he filled
so admirably. A man of vast learning, with the simplicity of a child, of
keen common sense tempered with great amicability, an admirable
writer, an ardent politician, wielding great power with never-failing
impartiality, Terence O'Connor passed his life in a world in which he
was exceptionally influential, and to which he was comparatively
unknown. His neighbours at Clapham had no idea that the slim gray-
haired gentleman whom they saw pottering about in his garden on
summer afternoons, or lying on the grass under the shade of a big
tree playing with his children, was the lightning-compeller and the
thunder-creator of the Comet.Though most earnest while engaged in
his work, it was his greatest delight to leave every trace of it behind
him at his office, and to be entirely free from its influence when at
home with his wife and children. Occasionally, of course, the few old
friends who dined with him would start a political or literary
discussion, in which he would bear his part; but he was never happy
until the conversation found its way back into the ordinary social
channels, or until a demand was made for music, of which he was
passionately fond. It was a lucky thing for Walter Joyce to make the
acquaintance and to win the regard of such a man as Terence
O'Connor, who had a wonderfully quick eye for character, and who,
having noticed Walter's readiness of appreciation and bright incisive
style in the few articles which he wrote on the occasion of his first
introduction by Mr. Byrne, suggested that the post at Berlin should
be offered to him. The more they were thrown together the better
they liked each other. Walter had the greatest admiration for
O'Connor's talent and power of work; while the elder man looked
kindly on his young friend's eagerness and enthusiasm, his desire for
distinction, and his delight at laudation, perhaps as somewhat
reflecting his own feelings before he had become settled down to
the mill-horse grind--ah, how many years ago!

After the conference had broken up, Joyce, to whom, perhaps, a


subject had been given to treat, would go back to his chambers and
work at it for two or three hours, or he would remain at the office
discussing the matter in detail with Terence O'Connor, and taking his
friend's advice as to the manner of treatment. Or, if he were free, he
would lounge in the Park, and stare at the equipages, and the
toilettes, and the London panorama of luxury there constantly going
by, all new to the country-bred young man, to whom, until he went
to Lord Hetherington's, the old rumbling chariot of Sir Thomas
Churchill, with its worsted-epauletted coachman and footman, was a
miracle of comfort and a triumph of taste. Or he would ramble out
with Shimmer, or Forrest, or some other of his colleagues, to the
suburbs, over the breezy heights of Hampstead, or through the
green Willesden lanes, and get the city dust and smoke blown out of
them. When he was not on duty at the office at night, Walter would
sometimes take the newspaper admission and visit the theatre; but
he had little taste for the drama, or rather, perhaps, for such
dramatic representations as were then in vogue, and it pleased him
much more to attend the meetings of the Forum, a club constituted
for the purpose of discussing the principal political and social
questions of the day, and composed of young barristers and
newspaper writers, with a sprinkling of public-office men, who met
in the large room of a tavern situated in one of the quiet streets
leading from Fleet Street to the river. The leaders of the different
political parties, and others whose deeds or works had given them
celebrity or notoriety, were happy in their ignorance of the existence
of the Forum, or they must have been rendered uncomfortable by
finding themselves the objects of so much wild denunciation. The
members of the Forum were not in the habit of concealing their
opinions, or of moderating the language in which those opinions
were expressed; and the debate in which the then holders of office
were not denounced as effete and useless nincompoops, bound by
degrading ties of subserviency to a policy which, while originally
dangerous, was now degrading, or in which the leaders of the
Opposition were not stigmatised as base-bred ruffians, linked
together by the common bond of ignorance with the common hope
of rapine--was considered dull and spiritless indeed. As Mr. Byrne
had intimated, Walter Joyce was one of the most prominent
members of this debating club; he had a clear resonant voice,
capable of excellent modulation, and spoke with fluency. His
speeches, which were tinged with a far more pronounced radicalism-
-the effect of the teaching of Jack Byrne--than had previously been
promulgated at the meetings of the Forum, soon became widely
talked of among the members and their friends, and Walter's rising
was eagerly looked forward to, and warmly hailed, not merely for
the novelty of his doctrine, but for the boldness and the humour
with which he sought to inculcate it. His success was so great that
the heads of the Tory party in the club became alarmed, and
thought it necessary to send off for Alister Portcullis, who was
formerly the great speaker on their side, but who had recently
become editor of a provincial paper, to return to town, and oppose
Joyce on one or two special subjects of discussion. Portcullis came
up to London, and the encounter took place before a room crowded
to the ceiling (it was rumoured--and believed by some--that the
Premier and the leader of the Opposition were present, with wigs
drawn over their eyes and comforters over their noses), and re-
echoing to the cheers of the partisans. Walter was understood to
have held his own, and, indeed, to have had the best of it; but
Portcullis made a very good speech, covering his opponent with
sarcasm and invective, and declaiming against the cause which he
represented with a whirlwind of fury which greatly incensed old Jack
Byrne, who happened to be sitting immediately beneath him.

Political feeling ran very high just at that time, and the result of
the forthcoming election was looked forward to with the greatest
confidence by the Radicals. The organisation of the party was very
complete. A central committee, of which Mr. Byrne and Terence
O'Connor were members, had its sittings in London, and was in daily
communication with the various local committees of the principal
provincial towns, and most of the intending candidates had been
despatched to make a tour of the neighbourhood which they
proposed to represent, with the view of ascertaining the feelings of
the electors, and ingratiating themselves with them.

Among these touring candidates was young Mr. Bokenham, who


aspired to represent the constituency of Brocksopp. Young
Bokenham had been selected by the central committee principally
because his father was a very influential manufacturer, and because
he himself, though not specially clever or deeply versed in politics,
was recommended as fluent, of good appearance, and eminently
docile and lead able. The reports which during and after his visit
came up from the local to the central committee by no means bore
out the recommendation. The fact was that young Mr. Bokenham,
who had at a very early age been sent to Eton, who had been a
gentleman commoner of Christchurch, and who had always had his
own way and the command of large sums of money to enable him to
do as he pleased, had become, as is very often the case under the
influence of such surroundings, a perfect type of the parvenu and
the plutocrat, and had, if anything, rather an antipathy for that
cause of which he was about to offer himself as one of the
representatives. To announce this would, however, he was aware, be
simply to renounce the very large fortune which would accrue to him
at his father's death, and which the old man, who had been a
staunch Radical from his earliest days, and who gloried in being a
self-made man, would certainly have dispersed through a thousand
charitable channels rather than allow one penny of it to be touched
by his politically renegade son. Moreover, young Bokenham pined for
the distinction of parliament membership, which he knew, for the
present at least, was only to be obtained by holding to his father's
political principles; and so ho professed to be in earnest in the
matter, and went down to Brocksopp and called on the principal
people of the place, and convened a few meetings and delivered a
few speeches. But the Brocksopp folk were very badly impressed.
They utterly failed to recognise young Tommy Bokenham, as they
had always spoken of him among themselves during all the years of
his absence, in the bearded, natty-booted, delicately gloved
gentleman, who minced his words and used a perfumed
handkerchief, and talked about the chah-tah of our lib-ah-ties. His
manner was unpleasant and offensive, and his matter was not half
sufficiently peppered to suit the tastes of the Brocksopp Radicals,
who could not be too frequently reminded that they were the salt of
the earth, and that the horny hand of labour was what their
intending representative was always wishing to clasp. Young Mr.
Bokenham, no longer Tommy after he had once been seen, objected
to the horny hand of labour, disliked the smell of factories, and the
manner and appearance of the working-classes altogether. He could
not drink much at the public-houses, and the smell of the strong
shag tobacco made him ill, and in fact his first tour for canvassing
was a woful and egregious failure, and was so reported to the
central committee in London by their Brocksopp agents.

On this report the committee met, and had a long and earnest
consultation. Brocksopp was an important place, and one which it
was most desirable to secure. No other candidate possessing such
wealth or such local influence as young Bokenham could be found,
and it was therefore imperative that he should be carried through. It
was, however, necessary that his mistakes should be pointed out to
him, and he should be thoroughly well schooled and advised as to
his future proceedings. He was accordingly invited to attend the next
meeting of the committee, which he did, and received a three-hours'
drilling with great composure. He promised to adopt all the
suggestions which were made, and to carry out all the plans which
were proposed. Walter Joyce, who happened to be present, was
much amused at Mr. Bokenham's great amiability and power of
acquiescence, and was about saying so to Mr. Byrne, who was
seated next him, when he was startled by hearing the candidate say,
in answer to a question from one of the committee as to whether
any one was in the field on the Tory side--

"Oh yes; an old gentleman named Creswell, a retired


manufacturer of great wealth and position in those parts."

"Is he likely to make a strong fight?"

"Well, ya-as!" drawled young Bokenham. "Old boy's not supposed


to care particularly about it himself, don't you know; but he's lately
married a young wife--doosid pretty woman, and all that kind of
thing--and they say she's set her heart on becoming the
memberess."
"Do you hear that?" whispered Byrne to Joyce.

"I do," replied Walter. "This man is a fool; but he must be got in,
and Mr. Creswell must be kept out, at all hazards."

And Jack Byrne grinned.


CHAPTER XXVII.

RIDING AT ANCHOR.

The intention, one of the first which Marian Creswell had


expressed after her marriage, and one which had so incensed
Gertrude, of converting the girls' music-room into a boudoir, had
long since been carried out. Almost immediately after he had
returned from his wedding trip, Mr. Creswell had sent to London for
decorators and upholsterers. An army of foreign artists, much given
to beard and pantomimical gesture, to humming scraps of operas
over their work, and to furtively smoking cigarettes in the
shrubberies whenever they could evade the stern eye of the
overseer, had arrived upon the scene; and when they returned to
town they left the music-room, which had been a bleak, gaunt,
cheerless apartment enough, a miracle of brightness and cosiness,
elegance and comfort. Everybody was astonished at the change, and
the young ladies themselves were compelled to confess that the
boudoir, as it then appeared, was perfectly charming, and that really,
perhaps, after all, Mrs. Creswell might have been actuated, apart
from mere malevolence and spite, by some sense and appreciation
of the capabilities of the room in the selection she had made. There
was a good deal of actual truth in this judgment; Marian had
determined to take the earliest opportunity of asserting herself
against the girls and letting them know the superiority of her
position; she had also intended, if ever she were able, to gratify the
wish to have a room of her own, where she might be absolute
mistress, surrounded by her books, pictures, and other belongings;
and by the acquisition of the music-room she was able to accomplish
both these intentions. Moreover, the windows of the music-room
looked out towards Helmingham. Half-way towards the dim distance
stood the old schoolhouse, where she had been born, where all her
childhood had been spent, and where she had been comparatively
innocent and unworldly; for though the worship of wealth had
probably been innate in her, and had grown with her growth and
strengthened with her strength, she had not then sacrificed others
to her own avarice, nor forfeited her self-respect for the gratification
of her overwhelming passion. In a person differently constituted, the
constant contemplation of such views might have had an irritating or
a depressing effect, but Marian's strength of mind rendered her
independent of any such feeling. She never thought with regret of
the step she had taken; she never had the remotest twinge of
conscience as to the manner in which she had behaved to Walter
Joyce; she was frequently in the habit of passing all the
circumstances in review in her mind, and invariably came to the
conclusion that she had acted wisely, and that, were she placed in a
similar position again, she should do exactly the same. No; she was
able to think over all the passages of her first and only love--that
love which she bad deliberately cast from the pedestal of her heart,
and trampled under foot--without an extra pulsation of excitement or
regret. She would pass hour after hour in gazing from her window
on distant places where, far removed from the chance of intrusion
by the prying villagers--who, however, were profoundly ignorant of
what was going on--she would have stolen interviews with her lover,
listening to his fond words, and experiencing a kind of pleasure such
as she had hitherto thought nothing but the acquisition of money
could create. Very tranquilly she thought of the bygone time, and
looked across the landscape at the well-known places. She had
slipped so easily into her present position, and settled herself so
firmly there, that she could scarcely believe there had been a time
when she had been poor and dependent, when she had been unable
to exercise her every whim and fancy, and when she had been
without an elderly gray-haired gentleman in constant attendance
upon her, and eager to anticipate her very slightest wish.
One afternoon, about eight months after her mother's death,
Marian was sitting at the window of her boudoir, gazing vacantly at
the landscape before her. She did not see the trees, erst so glorious
in their russet garments, now half-stripped and shivering in the bitter
autumnal wind that came booming over the distant hills, and
moaned wearily over the plain; she did not see the little stream that
lately flashed so merrily in the summer sunlight, but had now
become a brown and swollen foaming torrent, roaring where it had
softly sung, and bursting over its broad banks instead of coyly
slipping through its pebbly shallows; she did not see the birds now
skimming over the surface of the ground, now rising, but with no
lofty flight, the harbingers of coming storm; she did not see the dun
clouds banking up to windward; nor did she note any of the outward
characteristics of the scene. She was dull and bored, and it was a
relief when she heard the handle of the door turned, and, looking
round, saw her husband in the room.

There was nothing of palpable uxoriousness--that most


unpleasant of displayed qualities, especially in elderly people--in the
manner in which Mr. Creswell advanced and, bending over his wife,
took her face in his hands and kissed her cheek; nor in the way in
which he sat down beside her and passed his hands over her shining
hair; nor in the words of tenderness with which he addressed her. All
was relieved by a touch of dignity, by an evidence of earnest
sincerity, and the veriest cynic and scoffer at the domesticity and
what Charles Lamb called the "behaviour of married people," would
have found nothing to ridicule in the undisguised love and
admiration of the old man for his young wife, so quietly were they
exhibited.

"What made you fly away in that hurry from the library just now,
darling?" said he. "You just peeped in, and were off again, never
heeding my calling to you to remain."

"I had no notion you were engaged, or that anybody was here!"
said Marian.
"I am never engaged when you want me, and there is never
anybody here whose business is of equal importance with your
pleasure."

"When did you cultivate the art of saying pretty things?" asked
Marian, smiling. "Is it a recent acquisition, or one of old standing,
which had only rusted from disuse?"

"I never had occasion to try whether I possessed the power until
you came to me," said Mr. Creswell, with an old-fashioned bow.
"There, oddly enough, I was talking about speaking in public, and
the trick of pleasing people by public speaking, to those two men
when you looked into the room."

"Indeed. Who were your visitors?"

"I thought you would have recognised old Croke, of Brocksopp;


he seemed a little hurt at your running away without speaking to
him; but I put him right. The other gentleman has corresponded
with you, but never seen you before--Mr. Gould, of London. You
wrote to him just after poor Tom's death, you recollect, about that
sale."

"I recollect perfectly," said Marian. (She remembered In an instant


Joyce's allusion to the man in his first memorable letter.) "But what
brought him here at this time? There is no question of the sale
now?"

"No, dearest; but Mr. Gould has a very large practice as a


parliamentary agent and lawyer, and he has come down here about
the election."

"The election? I thought that was all put off!"

"Put off?" repeated Mr. Creswell. "Indefinitely? For ever?"

"I'm sure you told me so."


"Now, that is so like a woman The idea of an election being
quietly put aside in that way! No, child, no; it was postponed merely;
it is expected to come off very shortly."

"And what have these two men to do with it?"

"These two men, as you call them, have a great deal to do with it.
Mr. Croke is a leading man amongst the Conservative party--that is
my party, you understand, child--in Brocksopp, and Mr. Gould is to
be my London agent, having Mr. Teesdale, whom you know, as his
lieutenant, on the spot."

"You speak of 'my party,' and 'my agent,' as though you had fully
made up your mind to go in for the election. Is it so?"

"I had promised to do so," said Mr. Creswell, again with the old-
fashioned bow, "before you did me the honour to accept the position
which you so worthily fill; and I fear, even had you objected, that I
should scarcely have been able to retract. But when I mentioned it
to you, you said nothing to lead me to believe that you did object."

"Nor do I in the very smallest degree. On the contrary, I think it


most advisable and most important. What are your chances of
success?"

"Well, on the whole, good; though it struck me that our friends


who have just gone were a little too sanguine, and--at least, so far
as Mr. Croke was concerned--a little too much disposed to underrate
the strength of the enemy."

"The enemy? Ah!--I forgot. Who is our opponent?" Mr. Creswell


heard the change in the pronoun, and was delighted.

"A certain young Mr. Bokenham, son of an old friend and


contemporary of mine, who was launched in life about the same
time that I was, and seemed to progress step by step with me. I am
the younger man by some years, I believe; but," continued the old
gentleman, with an odd, half-sheepish look, "it seems curious to find
myself running a tilt with Tommy Bokenham, who was not born
when I was a grown man!"

"The position is one with which age has very little to do," said
Marian, with a slight hardening of her voice. "No, if anything, I
should imagine that a man of experience and knowledge of the
world had a better chance than a young and necessarily unformed
man, such as Mr. Bokenham. You say that your friends seemed
confident?"

"A little too confident. Old Croke is a Tory to the backbone, and
will not believe in the possibility of a Liberal being returned for the
borough; and Mr. Gould seems to depend very much on the local
reports which he has had from men of the Croke stamp, and which
are all of the most roseate hue."

"Over-certainty is the almost infallible precursor of failure. And we


must not fail in this matter. Don't you think you yourself had better
look into it more closely than you have done?"

"My darling one, you give me an interest in the matter which


previously it never possessed to me! I will turn my attention to it at
once, go into the details as a matter of business, and take care that,
if winning is possible, we shall win. No trouble or expense shall be
spared about it, child, you may depend; though what has given you
this sudden start I cannot imagine. I should have thought that the
ambition of being a member's wife was one which had never entered
your head."

"My head is always ready to serve as a receptacle for schemes for


my husband's advancement, whether they be of my own, or his, or
other people's prompting," said Marian, demurely. And the old
gentleman bent over her again, and kissed her on the forehead.

What was this sudden interest in these election proceedings on


Marian's part, and whence did it arise? Was it mere verbiage,
pleasant talk to flatter her husband, showing feigned excitement
about his prospects to hide the real carelessness and insouciance
which she could not choose but feel? Was she tired of his perpetual
presence in waiting upon her, and did she long to be rid of her
patient slave, untiring both in eye and ear in attention to her wants,
almost before they were expressed? There are many women who
weary very speedily of suit and service perpetually paid them, who
sicken of compliments and attentions, as the pastry-cooks' boys are
said to do, after the unrestricted gratification of their tart-appetites,
in the early days of their apprenticeship. Did she talk at random with
the mere idea of making things pleasant to her husband, and with
the knowledge that the mere fact of any expression of interest on
her part in any action of his would be more than appreciated? Not
one whit. Marian never talked at random, and knew her power
sufficiently to be aware that there was no need for the expression of
any forced feeling where Mr. Creswell was concerned. The fact was--
and it was not the first time she had acknowledged it to herself,
though she had never before seen her way clearly to effect any
alteration--the fact was that she was bored out of her life. The
golden apples of the Hesperides, gained after so much trouble, so
much lulling of the dragon of conscience, had a smack of the Dead
Sea fruit in them, after all! The money had been obtained, and the
position had been compassed, it was true; but what were they?
What good had she gathered from the money, beyond the fact of
the mere material comforts of house, and dress, and equipage?
What was the position, but that of wife of the leading man in the
very narrow circle in which she had always lived? She was the centre
of the circle, truly; but the circle itself had not enlarged. The elegant
carriage, and the champing horses, and the obsequious servants,
were gratifying in their way; but there was but little satisfaction in
thinking that the sight of her enjoyment of them was confined to
Jack Forman, sunning himself at the ale-house door, and vacantly
doffing his cap as homage to her as she swept by, or to the villagers
amongst whom she had been reared, who ran to their doors as they
heard the rumbling of the wheels, and returned to their back
parlours, envying her her state, it is true, but congratulating
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!

ebookball.com

You might also like