Introduction to C Programming for the Microsoft NET Platform 1st edition by Administrator - Experience the full ebook by downloading it now
Introduction to C Programming for the Microsoft NET Platform 1st edition by Administrator - Experience the full ebook by downloading it now
com
https://ebookball.com/product/introduction-to-c-programming-
for-the-microsoft-net-platform-1st-edition-by-
administrator-15220/
OR CLICK BUTTON
DOWLOAD EBOOK
https://ebookball.com/product/introduction-to-c-programming-for-the-
microsoft-net-platform-1st-edition-by-administrator-15220/
ebookball.com
https://ebookball.com/product/introduction-to-c-programming-for-the-
microsoft-net-platform-1st-edition-by-administrator-15326/
ebookball.com
https://ebookball.com/product/introduction-to-c-programming-for-the-
microsoft-net-platform-1st-edition-by-administrator-15318/
ebookball.com
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
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
https://ebookball.com/product/microsoft-c-programming-for-the-
absolute-beginner-1st-edition-by-andrew-
harris-1931841160-9781931841160-15246/
ebookball.com
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
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.
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.
Other product and company names mentioned herein may be the trademarks of their respective
owners.
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)
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
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.
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
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.
Prerequisites
Course Outline
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#
Note The information in this course is based on the Beta 1 prerelease version
of Microsoft Visual Studio.NET.
Introduction 7
http://www.microsoft.com/trainingandservices/
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
Facilities
Class Hours
Parking Messages
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.
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
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
Internet
Visual Studio.NET
Orchestration
Internet .NET Building
.NET
Enterprise Block
Framework COM+ Services
Servers
Windows
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
Visual
C++ C# JScript® …
Basic
Basic
Visual Studio.NET
Common Language Specification
.NET Framework
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
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
Windows API
6 Module 1: Overview of the Microsoft .NET Platform
Web User
Services
Services Interface
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
Thread Support
Support COM Marshaler
Marshaler
Security
Security Engine Debug Engine
Engine
Class Loader
Loader
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
System.Data System.XML
System.XML
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
ASP.NET
System.Web
Services UI
UI
Description
Description HtmlControls
HtmlControls
Discovery
Discovery WebControls
WebControls
Protocols
Protocols
Caching Security
Configuration SessionState
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
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
Review
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.
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
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
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#
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.
CHAPTER XXV.
CLOUDING OVER.
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?"
"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!"
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-
---"
"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----"
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.
"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.
"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----"
"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?"
"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--
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."
"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."
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.
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.
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--
"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."
RIDING AT ANCHOR.
"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."
"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."
"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."
ebookball.com