A programmer s introduction to C 2 0 3rd Edition Eric Gunnerson - Read the ebook online or download it to own the full content
A programmer s introduction to C 2 0 3rd Edition Eric Gunnerson - Read the ebook online or download it to own the full content
https://ebookfinal.com/download/a-programmer-s-introduction-to-c-1st-
edition-harvey-m-deitel/
https://ebookfinal.com/download/exploring-c-the-programmer-s-
introduction-to-c-1st-edition-ray-lischner/
https://ebookfinal.com/download/pro-c-2005-and-the-
net-2-0-platform-3rd-edition-andrew-troelsen/
https://ebookfinal.com/download/beginning-python-programmer-to-
programmer-1st-edition-peter-c-norton/
https://ebookfinal.com/download/learning-c-3-0-3rd-edition-jesse-
liberty/
https://ebookfinal.com/download/silverlight-3-programmer-s-reference-
wrox-programmer-to-programmer-1st-edition-j-ambrose-little/
A programmer s introduction to C 2 0 3rd Edition Eric
Gunnerson Digital Instant Download
Author(s): Eric Gunnerson, Nick Wienholt
ISBN(s): 9781590595015, 1590595017
Edition: 3
File Details: PDF, 2.94 MB
Year: 2005
Language: english
A Programmer’s Introduction
to C# 2.0
Third Edition
ERIC GUNNERSON AND NICK WIENHOLT
A Programmer’s Introduction to C# 2.0, Third Edition
Copyright © 2005 by Eric Gunnerson and Nick Wienholt
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN (pbk): 1-59059-501-7
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
Lead Editor: Jon Hassell
Technical Reviewer: Gavin Smyth
Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Tony Davis, Jason Gilmore,
Jonathan Hassell, Chris Mills, Dominic Shakeshaft, Jim Sumser
Assistant Publisher: Grace Wong
Project Manager: Kylie Johnston
Copy Edit Manager: Nicole LeClerc
Copy Editor: Kim Wimpsett
Production Manager: Kari Brooks-Copony
Compositors: Susan Glinert and Wordstop Technologies (P) Limited
Proofreader: Elizabeth Berry
Indexer: Broccoli Information Management
Artist: April Milne
Cover Designer: Kurt Krames
Interior Designer: Van Winkle Design Group
Manufacturing Manager: Tom Debolski
Distributed to the book trade in the United States by Springer-Verlag New York, Inc., 233 Spring Street,
6th Floor, New York, NY 10013, and outside the United States by Springer-Verlag GmbH & Co. KG,
Tiergartenstr. 17, 69112 Heidelberg, Germany.
In the United States: phone 1-800-SPRINGER, fax 201-348-4505, e-mail [email protected],
or visit http://www.springeronline.com. Outside the United States: fax +49 6221 345229,
e-mail [email protected], or visit http://www.springeronline.com.
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA
94710. Phone 510-549-5930, fax 510-549-5939, e-mail [email protected], or visit http://www.apress.com.
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution
has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to
any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly
by the information contained in this work.
The source code for this book is available to readers at http://www.apress.com in the Downloads section.
To Tony Jongejan, for introducing me to programming and being ahead of his time.
—Eric Gunnerson
Contents at a Glance
INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
Contents
What’s an Object? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Containment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Polymorphism and Virtual Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Encapsulation and Visibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Hello, Universe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Namespaces and using . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Namespaces and Assemblies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Basic Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Classes, Structs, and Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
vii
viii ■C O N T E N T S
Enums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Delegates and Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Properties and Indexers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Developing in C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
The Command-Line Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Visual Studio .NET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Other Tools of Note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
A Simple Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Member Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
ref and out Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Overloading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Class Accessibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Using internal on Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
internal protected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
The Interaction of Class and Member Accessibility . . . . . . . . . . . . . . . . . . . 55
Method Overloading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Method Hiding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Better Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Variable-Length Parameter Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Nested Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Other Nesting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Creation, Initialization, Destruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Finalizers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Managing Nonmemory Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
IDisposable and the Using Statement. . . . . . . . . . . . . . . . . . . . . . . . . 68
IDisposable and Longer-Lived Objects . . . . . . . . . . . . . . . . . . . . . . . . 69
Static Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Static Member Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Static Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Read-Only Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Static Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Partial Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
A Point Struct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Boxing and Unboxing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Structs and Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Design Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Immutable Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
x ■C O N T E N T S
■CHAPTER 10 Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
A Simple Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Working with Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
The as Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Interfaces and Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Design Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Multiple Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Explicit Interface Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Implementation Hiding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Interfaces Based on Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Interfaces and Structs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
"Oh, Miss Carter, I'm so glad you've come. Master Fred's all alone out
in the back parlor, and he's sad enough, poor boy!"
"Oh, do come quick, Miss Bessie!" he called out. "I'm so glad you have
come." And as he heard the door open, and the light, quick steps advancing
towards him, he stood up and put out both hands to greet his guest, with no
trace of his old fretful look.
With a hasty glance Bess noted the helplessness that prevented his
meeting her at the door, but she only said, as she kissed him,—
"Well, Fred, I am so glad to have you back within reach once more."
"You have missed me, then?" asked the child anxiously, as she drew him
to the sofa and seated herself by his side.
"Missed you, you silly boy! What a question! Of course I have. 'We
boys,' as Rob says, have been longing for you to be back again. I have felt
quite lost without you."
"How is Rob,—and all the other boys?" inquired Fred, relieved that
Bess seemed so unconscious of his condition.
"Well, all of them. Rob is coming down as soon as you feel like seeing
him. I see more of him than I do of any of the others. Phil runs in once in a
while, but he is so busy all the time. Teddy was at the house one day last
week, the same dear, slangy boy as ever. But tell me, am I not crazy to
come down such a day?"
"It's a kind of crazy I like," said Fred. "You were awfully good to come,
and I've been alone here ever so long."
"So much the better," said Bess, mentally abusing the mother who could
leave her boy under such circumstances; "we can have a real good, old-
fashioned visit, and when you get tired of me, you may send me off."
Fred could go no farther. Bess pulled the appealing little face over
against her shoulder, and gently smoothed his hair, as she answered, using
all her self-control to speak quietly,—
"Yes, dear, he did. I can't tell you how sorry we all felt for our boy. That
doesn't make it any easier to bear, I know; but perhaps in time we can help
you a little."
For the first time since his learning the sad truth, the boy broke down.
He had listened to the words of the oculist without a tear, too much stunned
even to speak, and he had met his father and mother with perfect quiet. But
the few gentle, loving words had broken his firm resolve not to be a baby;
and the tears gathered fast and fell, as he sat with his head on Bessie's
shoulder, her arm about his quivering little body.
"Oh, don't tell the boys!" he sobbed at last. "Don't tell them I cried. I
didn't mean to; but it's all so dreadful, here in the dark."
"My dear little boy, we all know how terrible it must be; but I won't tell
the boys if you say so. Just cry it all out; you have tried to be too brave. Rob
almost cried for you last night."
The sobs came less often, but the look of sadness on the boyish face
made Bessie's heart ache for the child, but she said cheerfully,—
"Now, my son, I am going to take my old place as nurse to-day. You
aren't very strong yet, and I want you to lie down again here on the sofa,
and if you can spare a little of this lunch—I don't approve of candy between
meals, you know—I'll move the table away, pull up this low chair, and tell
you all the news."
Suiting the action to the word, Bess tucked the afghan round Fred's feet,
drew a willow chair up to the place of the despised table, and sat down
close to the child, who once more reached out for her hand.
For an hour she sat there chatting to the boy, telling him of the scrapes
his friends had been in, of the pranks they had played, until she began to see
traces of the old merry Fred, as the look of sorrow gave place to a smile,
and then to a hearty laugh, while she described Rob's recent attempts to
climb a picket fence too hastily, and his being caught by his shoe and hung
head downward, from which position he was ignominiously rescued by a
passing Irishman.
In the mean time, Bess was glad that her little friend could not see her
expression, as she sat looking at the worn, sad face, and the great vacant
eyes, that used to have such bright mischief dancing in them. But she forced
herself to talk on, as easily as she could, more than rewarded by the
pleasure in Fred's face, and his tight grip of her hand.
At length a step was heard on the stairs, and Mrs. Allen, daintily dressed
and looking provokingly fresh and unruffled, Bess thought, came into the
room.
"Why, Bessie, when did you come? How stupid of Mary not to tell me
you were here!"
"I told her I came to see Fred, and not to disturb you," said Bess, as Mrs.
Allen swept to the sofa and bent over her son.
"I am quite jealous of Fred, for you have hardly been here all the time
he was away," she said. "But he needs you now badly enough, poor boy!"
putting a delicately embroidered handkerchief to her eyes. "Isn't it hard to
see him in this condition?"
Again the burning flush rolled up to Fred's hair, and the hand that was
tightly clasping Bessie's grew suddenly cold. Bess gently kissed him before
she answered,—
With an air of relief, Mrs. Allen took the hint, and left them alone again.
When she was gone, the boy settled back on his pillow, saying gratefully,—
"It is awfully nice to have you here. Tell some more about the fellows."
So Bess talked on, racking her brains for any bright, funny bit of gossip
that could rouse the lad from his depression, and give him something to
think of during the many sad, lonely hours that she saw were in store for
him. But the dreamy chime of the cathedral clock on the mantel, as it struck
four, reminded her of her promise to see Rob after school, and she rose to
go, saying brightly,—
"Now, my boy, I have worn you all out with such a long visit, for a first
one. I must go now, for Rob is coming up after school, and I must be at
home in time to see him. I hope I sha'n't drown on the way," she added, as a
fresh gust of wind brought a flurry of rain against the windows.
"I wish you needn't go," said the child. "It has been so jolly to see you
again. You haven't been here but a few minutes."
"An hour and a half, exactly," answered Bess, "but I'm coming again
real soon."
In the early twilight of the stormy day, the room was growing dark. As
Bess stooped to say good-by to the boy, she was surprised to feel the hot
tears on his cheeks. Sitting down on the edge of the sofa, she drew his head
over into her lap, and stroked his face in silence, for she felt no words could
comfort the little lad.
"If you only needn't go," he said. "It all seems so much easier when you
are here. Miss Bessie, I can't stand it! What shall I do?"
"Fred, I know it is hard, so very hard. I wish I could stay with you
always, if you want me. But I will truly come again in a day or two. We are
all so sorry for you, and long to help you." Then she asked, "May Rob come
some day to see you? He is such a good little nurse."
"Not yet," said he. "I'd rather not have the boys round just yet. But I
mustn't keep you. Good-by." And, getting up, he moved a few steps towards
the door.
"Don't be in too much of a hurry, my dear," said Bess. "I must ring for
Mary to bring my cloak. Don't try to come to the door, you will only tire
yourself for nothing." And, putting him back on the sofa with a gentle force,
she kissed him and was gone.
Later, when Bess, her parents, and Rob, who had been prevailed upon to
stay, sat at their dinner-table, the young lady, after silently pondering some
question in her own mind, suddenly announced with considerable energy,—
"I think Mrs. Allen is the most selfish woman I ever saw!"
Mrs. Carter, in her surprise at the outburst, dropped the biscuit that she
was feeding to Fuzz, under cover of the tablecloth; for it was the rule of the
family, agreed to by each, and broken by all, that Fuzz should not be fed at
meal-times. The biscuit was at once appropriated by the dog, who trotted
off to a corner with it in his mouth, and there proceeded to devour it, with
sundry growls at the shaggy collie who gazed with longing eyes on the
tempting morsel.
"Bess, my daughter," began Mrs. Carter, "don't be too severe. She may
not be very strong."
"Strong, mother! How much strength does it take to entertain one's son
who is ill? She'd better give up a few dinners and theatres. The idea of her
leaving Fred alone all the afternoon. Rob, the next time you come up here,
when you are tired and cross and headache-y, I am going to take a nap, so
there!"
CHAPTER III.
True to her promise, Bess did go often to see her boy. For several weeks
it was her habit to spend a part of every afternoon with him; and the lad's
evident pleasure at her coming made her feel richly rewarded for the time
she gave up to him. He at once recognized her step in the hall, and she
always found him sitting up on the sofa, eagerly waiting for her to come to
him.
Mrs. Allen rarely appeared, and the two had the room to themselves,
while Bess either read aloud, or talked to Fred as she sewed on some bit of
work she had brought with her. To her mother she confessed that after her
usual call her mind was a blank, for she tried so hard to think of some
bright, interesting conversation for the lonely, sad boy. Her patient was not
an easy one to manage, for though Fred rarely complained, during the long
hours he was alone he brooded over his trouble until it seemed even harder
than before, and the old days of school and games were like dreams of
another and a happier world. His father was at his office all day, and his
mother, absorbed in her social life, had little time to give to her son; and
both of them regarded the boy as well cared for if he were only supplied
with all sorts of dainties, and had the most comfortable sofa and chair given
up to him.
Sometimes Bess found the child so disconsolate that she knew not how
to comfort him; sometimes he was moody, and slow to respond to her
efforts to be entertaining, but before she left him, her womanly tact had
smoothed away the frown, and forced him to laugh in spite of himself. And
in the worst of his moods he was never cross to her, but always seemed
grateful to her for her coming.
"If you only needn't go home at all!" he said to her one day. "It's lots
more fun when you are here, Miss Bess. The rest of the time I just lie here
and think till I get cross, and everything seems awful."
"Why do you 'just lie here and think,' then?" asked Bess, feeling that
here was a chance to make a good suggestion. "You are strong enough now
to go to drive every pleasant day. Why don't you?"
"I don't know; I don't want to," said Fred, as the quick color came to his
cheeks, that were beginning to have a more healthy look.
Bess was expecting that reply, for several times before now she had
tried to coax the boy into going out. But he had been ill and by himself for
so long, and had dwelt so continually on himself, that he had become very
sensitive about his blindness, a state of mind not at all improved by his
mother's tactless attempts at consolation. With Bess he could and did talk
freely, but with no one else, and he shrank from meeting any one who
called, and obstinately refused to see his boy friends, although Bess urged
him to let them come.
It was such an unnatural life for the boy, who, save in the one respect,
was rapidly returning to his old strength. Once let him break over this
sensitive reserve, and persuade himself to go out and enjoy the boys, and
Bess was sure that his life would be easier to bear.
To-day they were in their usual place by the fire. Bess was sewing, and
Fred was by her side, playing with the long loops of ribbon that hung from
her belt. Suddenly the girl rose and went to the window.
"I am going to run away from you, you obstinate boy. I want to see your
mother a minute. I'll come back, so don't you worry."
For Bess had determined on a bold stroke. The air inside the room was
warm and heavy with the fragrance of roses. Outside, all was bright and
bracing, for an inch or two of snow had fallen the night before, and the air
after the storm was clear and sweet. Across the street, two rosy-cheeked
urchins were having a grand snowball fight, and Bess only wished that she
and Fred could join them. She heard their shouts of laughter as a
particularly large snowball struck one of them, just as he was stooping for
more ammunition, and half the snow was scattered down his neck.
Mrs. Allen, in a light wrapper, lay on a sofa, while Mary was kneeling
by her side, industriously polishing the nails of her mistress.
"Mrs. Allen," said Bess abruptly, "may Fred and I have the coupé this
afternoon?"
"No, he doesn't," replied Bess, "but I want to have him go, and I think
that if the carriage were all at the door, I could get him started. May I try?"
"Of course you can have the carriage, Bessie; (a little more on the
thumb, Mary) but why do you tease him, if he doesn't want to go? It won't
be any pleasure to him, and if he is more comfortable at home, why not let
him do as he likes?"
Bess dropped into a chair, and wrinkled her brows with exasperation.
"Why, don't you see, Mrs. Allen," she said, "the boy can't spend all his
life in that one room. He must go out of it sometime, and the longer he
waits the harder it will be for him. He ought to have been out weeks ago,
for he needs the fresh air, and he is getting just blue and morbid from
staying alone in the house all this time."
"Perhaps you are right (now the other hand, Mary). Of course you can
have James and the coupé, if you will order what you want. It will be
pleasanter for you, if not for Fred."
Bess felt her color come. She had not expected much from Mrs. Allen,
but this was too unkind,—to think that she was speaking two words for
herself and one for Fred! But Mrs. Allen was not fine enough to see how
her remark had cut, and Bess resolved to bear anything for the sake of her
boy; so she thanked his mother, a little coldly, perhaps, and then departed to
the kitchen, where she asked the coachman to bring the coupé to the door as
soon as he could, and requested the plump, ruddy cook, the family tyrant, to
get her Fred's coat and hat.
"An' is it goin' out he is? Bless the poor dear b'y; it's a long, long time
since he's had a hat on his head, and it's I as am glad to be gettin' it for you.
The air'll do him good, sure!"
Bess thanked the woman warmly as she took the wraps, for she noted
the difference in tone between the mother and the servant. Then she
returned to the parlor, where she dropped Fred's heavy coat and hat on a
chair, and went back to her old place by the fire.
"Seems to me you've been gone a good while," said the boy, as Bess sat
down on the sofa, and pulled his head, pillow and all, into her lap.
"I just wanted you to find out how charming my society is," she said
playfully, as she twisted his scalp-lock till it stood wildly erect.
"As if I didn't know anyway," responded Fred. "But what are you trying
to do to me?"
"Only beautifying you a little, sonny," said Bess, with one eye on the
window.
In a few moments she saw the carriage drive up to the door and stop.
She took the boy's hand firmly in her own, and said very quietly, from her
position of vantage,—
"The coupé is all ready at the door, and I have brought in your coat and
hat. It is such a lovely day, I want you to come for a drive. Will you?"
"No, I won't," said the boy, turning his face away from her, and putting
his hand over his eyes.
"Listen, Fred," said Bess firmly; "I know just how you feel about this,
but is it quite right to give up to it? You have all your life before you, and
you can't lie on this sofa all your days. I have waited until you were
stronger, hoping you would feel like starting out; but the longer you are
here, the harder it will be! You will have to go sometime; why not to-day?"
"What's the use?" asked the boy sadly. "I sha'n't get any good of going. I
don't see why I'm not as well off here."
"It is a beautiful day after the snow, and the air is so fresh it will do you
good. You need some kind of a change. We will only go a little way, if you
say so. Come, Fred." And she waited.
She saw the boy shut his lips tight together, and two great tears rolled
out from under his hand. Then he said slowly,—
"That's my dear, brave boy," said Bess, as she went to get their wraps.
She helped Fred into his hat and coat, quickly put on her own, and, drawing
his hand through her arm, led him to the door, talking easily all the time to
keep up the lad's courage.
Just as they came out of the house, Rob and Phil chanced to be passing.
Turning, as they heard the door open and close, they saw Bess helping their
friend to the carriage, waved their hats to her, and started to run back to
greet Fred. But Bess motioned to them to keep away, for she felt that her
charge was in no condition now to meet these strong, lively friends, just as
he was forced to realize anew his own helplessness. So the lads stood sadly
by, looking on while their unconscious friend slowly and awkwardly
climbed into the carriage. Bess followed, and, with a wave of her hand to
the watching boys, they drove away.
"That isn't much like Fred," said Phil, as he turned away with a serious
look on his jolly, freckled face. "Just think of the way he used to skate, and
play baseball and hare and hounds! It must be awful for him. But isn't it
funny he won't let us go to see him?"
"I don't know," replied Rob, meditatively patting a snowball into shape;
"I guess if I were like what Fred is, I shouldn't want the boys round, for
'twould just make me think all the time of the things I couldn't do. Cousin
Bess is awfully good to him; she's down here ever so much."
"I know it. Wonder if anything happened to me, she'd take me up," said
Phil, half enviously. "I just wish she was my cousin, Bob. Why, she's as
good as a boy, any day!"
In the mean-time, Fred's first care had been to draw down the curtains
on his side of the carriage, and then he shrank into the corner, answering as
briefly as possible to Bessie's careful suggestions for his comfort. But her
endless good-humor and fun were never to be long resisted, and he was
soon talking away as rapidly as ever, while the change and the motion and
the cool crisp air brought a glow to his cheeks that made him look like the
Fred of former days. After driving for nearly an hour, the carriage stopped.
"At mine, not yours. Mother was going out to tea, to-night, and you
have been such a good boy that, as a reward of merit, I am going back to
dinner with you; only I must stop and tell mother, and send word to Rob to
come down after me. Shall I come?" And Bess paused with a smile, waiting
to see the effect of her new plan.
"Oh, yes, do come!" said Fred eagerly. "And tell Bob not to come for
you too early."
"What fun we'll have," he continued, when Bess had come back from
the house and they were driving away, regardless of the wails of Fuzz, who
surveyed them from a front window. "We'll play—how I wish I ever could
play games any more!" And his face grew dark again.
"You can, ever so many. But will you go home, or shall we drive a little
longer?"
"No, I don't know as I'm sorry, as long as you came too. But it's no fun
driving alone, and mother's too busy to go with me."
The boy was in fine spirits, in his delight at having Bess stay to dinner,
all to himself, and the two told stories and asked conundrums till the room
fairly rang with their mirth. At dinner, Bess sent Mary away and waited on
the boy herself, giving him the needed help in such a matter-of-course
fashion that he forgot to feel sensitive about it until long after his guest had
gone.
After dinner, when the table was cleared away, and Fred's sofa moved
again to the fire, they both settled themselves on it for a quiet chat. The fire
shone out on a pretty picture. Bess, in her dark red gown, sat leaning
luxuriously against the dull blue cushions of the oak sofa, while Fred was
close by her side, with his hand through her arm, his head on her shoulder,
listening with a laughing face to his friend's account of some college frolics.
There was no light in the room but the steady glow from the grate, that
plainly showed their faces, but for the moment kindly hid the sad, blank
look in Fred's once beautiful eyes, and only gave them a dreamy, thoughtful
expression, as from time to time he turned his face up to Bess.
In the midst of their conversation, the bell rang, and the next moment
Mary, privately instructed by Bess, without word of warning ushered Rob
into the room. For a minute he stood, hesitating whether to speak to Fred or
not, but Bess quickly came to the rescue.
"Why, Rob, here so soon? Come up to the fire; there's ever so much
room here on the sofa."
As both boys declined to break the silence, Bess again took the lead.
"Yes it's freezing fast, and 'twill be fine skating to-morrow. All us boys
are planning to go"—And Rob came to a sudden halt, as the idea dawned
on him that such subjects were not interesting to Fred, who asked abruptly,
—
"How's Phil?"
"Football, of course." And both the boys laughed, for Bert's chronic
devotion to the game was the joke of all his friends.
But the next moment Bess felt Fred's head come over against her
shoulder. Rob watched him pityingly, not daring to speak his sympathy,
though he read his friend's thought.
"We've been reading 'Story of a Bad Boy,' this afternoon," said Bess,
trying once more to start the boys. Rob caught eagerly at the bait.
And the boys were all animated as they discussed the details of the
story. Bess sat and watched them, occasionally putting in a word or two,
and soon all constraint had vanished, as the talk ran on from subject to
subject, and the long year of separation was a thing of the past.
Rob, mindful of what Bess had told him about Fred's sensitive reserve,
tried to seem perfectly unconscious of the change in his boy friend, but he
looked anxious and troubled, between his sympathy for Fred, and his desire
to say just the right thing. But when Bess rose to go, and Fred was slowly
following her to the door, Rob could stand it no longer,
Contrary to his expectations, the simple, boyish pity went right to Fred's
heart, and did it a world of good, but he only said,—
"It isn't much fun, Bob, I tell you. But won't you come down again some
day? I wish you would."
And Bess went home, well pleased with her day's work.
CHAPTER IV.
"Cousin Bess," Rob had said that morning, "may some of us boys come
up to-night, or will we be in the way?"
"Not a bit of it!" replied Bess heartily; "I wish you would. Who are
coming?"
"Oh, just the regular crowd, Ted and Phil and Bert and Sam. The boys
wanted me to ask if we might, for fear you'd be out, or busy, or something."
"I am afraid your boys won't come," said Mrs. Carter, as they sat
lingering over their dinner. "It is too bad, when you are all ready for your
candy-pull."
"Have him!" echoed Bess. "It is easy to say 'have him,' but except for
half a dozen drives, he has refused to go out at all; and he won't see any of
the boys but Rob. Poor Rob tries to be very devoted, but I dimly suspect
Fred is occasionally rather cross."
"Rob takes it very meekly," Bess went on, as she slowly peeled an
orange. "Fred never shows that side to me, but I think it is there. But it is
really scandalous the way Mrs. Allen goes on. Fred is left to himself the
whole time, just when he needs so much help physically, mentally, and
morally."
"I wish you could have him all the time, Bess," said her mother. "You
are good for him, and he enjoys you."
"Let's adopt him, mother! He's splendid material to work on, and I
would take him in a minute if I could. Think of me with an adopted son!"
And Bess drew herself up with an air of majesty as she began to devour her
orange. Suddenly she laughed.
"I was so amused the other day, Saturday it was, when I went down to
Fred's in the afternoon. I was later than usual, and Rob happened to be there
ahead of me. You know I always go right in without stopping to ring, and
that day, as I went, I heard loud voices in the back parlor. I went in there,
and found that the boys had evidently been having a quarrel, for Fred had
turned his back to Rob, and was decidedly red in the face; while Rob sat
there, the picture of discomfort, his face pale, but his eyes fairly snapping.
He departed as soon as I went in, and neither boy would tell me what was
the trouble. Fred said he didn't feel well, and didn't want to see Rob,
anyway. I offered to go away too, but he wouldn't allow that."
"He said he supposed Fred was angry at something he had said in fun.
He was quite distressed over it, and offered to apologize, but I advised him
to just wait a few days till Fred recovered from his tempers."
"Much the best way," assented Mrs. Carter. "Fred mustn't grow
tyrannical. Here come the boys."
It was a needless remark, for at that moment there was heard a sudden
chattering of young voices, the sound of ten feet leaping up the steps, and
the laughter and stamping as the boys shook off the snow. Fuzz darted to
the door, barking madly, while an echo from without took up his voice and
multiplied it fivefold. Bess picked up the wriggling little creature, who was
carried off by Mrs. Carter; then she admitted her young guests, who came in
all talking at once.
"I am ever so glad to have you care to come, boys. But come right in to
the fire and dry those wet feet. Phil, I am glad to see you wore rubber
boots."
"They're all full of snow where I fell down," answered Phil, as he
struggled to pull them off. "Here, Bob, help a fellow, will you?"
And the boots came off with a jerk, while a shower of half-melted snow
proved the truth of his statement.
As the lads drew their chairs to the fire and prepared to toast their toes,
a moment must be given up to glancing at them, as they sit recounting to
their hostess their varied experiences in the storm.
At her left hand sat Phil Cameron, a short, slight, delicate-looking boy
of thirteen, whose gray eyes, large mouth, pug nose, and freckled face
laughed from morning till night. Everybody liked Phil, and Phil liked
everybody in return. His invariable good temper, and a certain headlong
fashion he had of going into the interest of the moment, made him a favorite
with the boys; while his elders admired him for his charming manners and
his wonderful soprano voice, for he and Rob had the best voices in the little
village choir. Though not overwhelmed with too much conscience, Phil was
a thoroughly good boy, and one that his teachers and older friends petted
without knowing exactly why they did so.
Beyond him sat his great friend and boon companion in all their athletic
games, Bert Walsh, the doctor's son, a lad whose poet's face, with its great,
liquid brown eyes, and whose slow, deliberate speech, gave no indication of
the force of character that lay below. Like Phil, he was fond of all out-of-
door sports, but, unlike him, he was fond of books as well. A strong
character, emphatic in its likes and dislikes, Bert's finest trait was his high
sense of honor, that was evident in his every act.
On the other side of Bess was the minister's son, Teddy Preston, the
oldest of eight children, a frank, healthy, happy boy, good and bad by turns,
but irresistible even in his naughtiness. Brought up in a home where books
and magazines were always at hand, though knees and toes might be a little
shabby, Ted had contrived to pick up a vast amount of information about the
world at large; and, added to that, he had the happy faculty of telling all he
knew. With an easy assurance he slipped along through life, never
embarrassed, and taking occasional well-merited snubs so good-naturedly
that his friends might have regretted giving them had they not known only
too well that they slid off from his mind like the fabled water from a duck's
back. A year younger than Phil, his yellow head towered far above him, and
he outgrew his coats and trousers in a manner entirely incompatible with
the relative sizes of the family circle to be clothed, and of the paternal
salary. But Ted never minded that. He carried off his shabby clothes as
easily as Bert did his perfectly fitting suits, and seemed in no way
concerned about the difference.
A year older than any of the other lads was Sam Boeminghausen, a
short, sturdy boy, a real German, blond, phlegmatic, and good-humored.
But his light blue eyes had a look of determination that suggested that the
day might come when Sam would be something or somebody. His father
had recently made a large fortune in Western cattle-ranching, and, as yet,
the family had not entirely adapted themselves to their new surroundings.
Sam's grammar was erratic, and his expensive garments had the look of
being made for another and a larger boy. But time would change that, and
under the careless speech and rough manners Bess could see the
possibilities of a glorious manhood.
On the floor at Bessie's feet sat our old friend Rob, poking the fire with
the tongs. The light fell on his fine, soft, brown hair, delicate skin, and
great, laughing dark eyes. Rob was the descendant of a long line of refined
ancestors, a real little gentleman, and he showed it from the perfect nails on
his small slim hands, brown as berries though they were, to the easy
position in which he now sat, with one foot curled under him. A gentle, shy
boy, affectionate and easily managed, he was an inveterate tease, and full of
a quiet fun that sparkled in his eyes and laughed in his dimples.
But while we have been gazing at the five lads, all so different from one
another, there was a sudden burst of applause as Bess rose, saying,—
"Now, boys, if you are all dry, I am going to invite my company out into
the kitchen. What do you say to making molasses candy and popcorn balls?
It is just the night for it."
"That's just dandy!" exclaimed Ted, springing up with a force that sent
his chair rolling back some inches.
"Ted, if you talk slang I sha'n't give you any to eat," said Bess
laughingly. "But come, boys." And she led the way into the large kitchen,
where her mother soon followed them with five large gingham aprons in
which she proceeded to envelop the lads, in spite of their derisive
comments.
"I am not going to have you spoil your clothes, children, for then your
mothers will scold us. Now, if I can't help you, Bess, I am going to stay
with Fuzz; and I leave you to do your worst."
"Don't go, Mrs. Carter," implored Ted, and the others echoed him; but
Mrs. Carter was not to be bribed, even by Phil's noble offer to let her do his
share of the work.
"I will eat your share of the candy, Phil, but I am going to stay with Mr.
Carter and Fuzz. I'll come and look at you by and by." And, drawing her
white shawl around her, she was gone.
Bess quickly divided her forces. Rob and Ted were set to shelling the
corn, while Phil and Bert scorched it and their faces at the same time. The
impressive duty of stirring the molasses she reserved for herself, assisted at
times by Sam.
For a short time all went well. But just as the bright new pan was nearly
full of the white kernels, and the molasses was beginning to show its
threads, a sudden determined bark was heard at the door, and the scratching
of two active little paws. Then followed the sound of Mrs. Carter's voice in
warning tones,—
"It's Fuzz," said Rob. "Can't I let him in, Cousin Bess?"
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookfinal.com