100% found this document useful (8 votes)
36 views

Download ebooks file CLR Via C Applied Microsoft Net Framework 2 0 Programming 2nd ed. Edition Jeffrey Richter all chapters

Programming

Uploaded by

sorosmobusdn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (8 votes)
36 views

Download ebooks file CLR Via C Applied Microsoft Net Framework 2 0 Programming 2nd ed. Edition Jeffrey Richter all chapters

Programming

Uploaded by

sorosmobusdn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Download the full version of the ebook at ebookname.

com

CLR Via C Applied Microsoft Net Framework 2 0


Programming 2nd ed. Edition Jeffrey Richter

https://ebookname.com/product/clr-via-c-applied-microsoft-
net-framework-2-0-programming-2nd-ed-edition-jeffrey-
richter/

OR CLICK BUTTON

DOWNLOAD EBOOK

Download more ebook instantly today at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Microsoft Windows PowerShell 2 0 programming for the


absolute beginner 2nd ed Edition Jerry Lee Ford

https://ebookname.com/product/microsoft-windows-
powershell-2-0-programming-for-the-absolute-beginner-2nd-ed-edition-
jerry-lee-ford/
ebookname.com

Programming in Objective C 2 0 2nd Edition Stephen G.


Kochan

https://ebookname.com/product/programming-in-objective-c-2-0-2nd-
edition-stephen-g-kochan/

ebookname.com

Pro Dynamic NET 4 0 Applications Data Driven Programming


for the NET Framework 1st Edition Carl Ganz Jr.

https://ebookname.com/product/pro-dynamic-net-4-0-applications-data-
driven-programming-for-the-net-framework-1st-edition-carl-ganz-jr/

ebookname.com

Integrated Principles of Zoology Fourteenth Edition


Cleveland P. Hickman

https://ebookname.com/product/integrated-principles-of-zoology-
fourteenth-edition-cleveland-p-hickman/

ebookname.com
Daylighting Architecture and Lighting Design 1st Edition
Peter Tregenza

https://ebookname.com/product/daylighting-architecture-and-lighting-
design-1st-edition-peter-tregenza/

ebookname.com

Bon Appetit Aug 2017 Bon Appetit

https://ebookname.com/product/bon-appetit-aug-2017-bon-appetit/

ebookname.com

Broadband Communications via High Altitude Platforms 1st


Edition David Grace

https://ebookname.com/product/broadband-communications-via-high-
altitude-platforms-1st-edition-david-grace/

ebookname.com

Viking Longship Keith Durham

https://ebookname.com/product/viking-longship-keith-durham/

ebookname.com

Research Methods in Anthropology Qualitative and


Quantitative Approaches Fourth Edition H. Russell Bernard

https://ebookname.com/product/research-methods-in-anthropology-
qualitative-and-quantitative-approaches-fourth-edition-h-russell-
bernard/
ebookname.com
Field Guide to Freshwater Fishes of California Revised
Edition Samuel M. Mcginnis

https://ebookname.com/product/field-guide-to-freshwater-fishes-of-
california-revised-edition-samuel-m-mcginnis/

ebookname.com
Additional Resources for Developers
Published and Forthcoming Titles on Microsoft Visual Studio 2005 and SQL Server 2005

Visual Basic 2005 Programming Microsoft Programming Microsoft Working with Microsoft
ASP.NET 2.0 SQL Server 2005 Visual Studio® 2005
Microsoft® Visual Basic® 2005 Core Reference Team System
Andrew J. Brust, Stephen
Express Edition: Richard Hundhausen
Dino Esposito Forte, and William H. Zack
Build a Program Now! 0-7356-2185-3
0-7356-2176-4 0-7356-1923-9
Patrice Pelland
0-7356-2213-2
Programming Microsoft Inside Microsoft Other
Microsoft Visual Basic 2005
ASP.NET 2.0 Applications SQL Server 2005: Developer Topics
Advanced Topics The Storage Engine
Step by Step Software Estimation:
Dino Esposito Kalen Delaney
Michael Halvorson 0-7356-2177-2 Demystifying the Black Art
0-7356-2105-5
0-7356-2131-4 Steve McConnell
0-7356-0535-1
Programming Microsoft Database Inside Microsoft
SQL Server 2005:
Visual Basic 2005: Microsoft ADO.NET 2.0 The Security
T-SQL Programming
The Language Step by Step Development Lifecycle
Itzik Ben-Gan, et al.
Francesco Balena Rebecca M. Riordan Michael Howard
0-7356-2197-7
0-7356-2183-7 0-7356-2164-0 Steve Lipner
Inside Microsoft 0-7356-2214-0
C# 2005 Programming Microsoft
SQL Server 2005:
ADO.NET 2.0 Writing Secure Code,
Microsoft Visual C#® 2005 Core Reference
Query Tuning and
Optimization Second Edition
Express Edition:
David Sceppa Michael Howard
Build a Program Now! Kalen Delaney
0-7356-2206-X David LeBlanc
Patrice Pelland 0-7356-2196-9
0-7356-1722-8
0-7356-2229-9
Programming Microsoft
Inside Microsoft
ADO.NET 2.0 Code Complete,
Microsoft Visual C# 2005 SQL Server 2005:
Advanced Topics Second Edition
Step by Step T-SQL Querying
Glenn Johnson Steve McConnell
John Sharp Itzik Ben-Gan, et al.
0-7356-2141-1 0-7356-1967-0
0-7356-2129-2 0-7356-2313-9

Programming Microsoft SQL Server 2005 Other Visual


Programming Connected
Systems with Microsoft
Visual C# 2005: Microsoft SQL Server® 2005 Studio 2005 Topics WinFX®: A Programmer's
The Language Express Edition Step by Step:
Programming Microsoft Guide
Donis Marshall Developing Database
Applications Windows® Forms Aaron Skonnard
0-7356-2181-0
Charles Petzold Matt Milner
Jackie Goldstein
0-7356-2153-5 0-7356-2258-2
CLR via C#, 0-7356-2184-5
Second Edition
Programming Microsoft Software Requirements,
Jeffrey Richter Microsoft SQL Server 2005
Web Forms Second Edition
0-7356-2163-2 Programming
Douglas J. Reilly Karl E. Wiegers
Step by Step
0-7356-2179-9 0-7356-1879-8
Web Development Fernando Guerrero
0-7356-2207-8
Microsoft Visual Web Debugging, Tuning, and More About Software
Developer ® 2005 Testing Microsoft .NET 2.0 Requirements: Thorny
Microsoft SQL Server 2005
Express Edition: Applications Issues and Practical Advice
Analysis Services
Build a Web Site Now! John Robbins Karl E. Wiegers
Step by Step
Jim Buyens 0-7356-2202-7 0-7356-2267-1
Hitachi Consulting
0-7356-2212-4
0-7356-2199-3
CLR via C+ +
Microsoft ASP.NET 2.0 Jeffrey Richter with
Microsoft SQL Server 2005
Step by Step Stanley B. Lippman
Reporting Services
George Shepherd 0-7356-2248-5
Step by Step
0-7356-2201-9
Hitachi Consulting
0-7356-2250-7

Explore our full line of learning resources at: microsoft.com/mspress and microsoft.com/learning
Acclaim for the First Edition: Applied
Microsoft .NET Framework Programming
The time Jeffrey spent with the .NET Framework is evident in this well-written and
informative book.
— Eric Rudder (senior vice president, developer and platform evangelism, Microsoft)

Jeff has worked directly with the folks who built the CLR [common language runtime]
on a daily basis and has written the finest book on the internals of the CLR that you'll
find anywhere.
— Dennis Angeline (lead program manager, common language runtime, Microsoft)

Jeff brings his years of Windows programming experience and insight to explain how
the .NET Framework really works, why we built it the way we did, and how you can
get the most out of it.
— Brad Abrams (lead program manager, .NET Framework, Microsoft)

Jeff Richter brings his well-known flair for explaining complicated material clearly,
concisely and accurately to the new areas of the C# language, the .NET Framework,
and the .NET common language runtime. This is a must-have book for anyone want-
ing to understand the whys and hows behind these important new technologies.
— Jim Miller (lead program manager, common language runtime kernel, Microsoft)

Easily the best book on the common language runtime. The chapter on the CLR gar-
bage collector [Chapter 19 in the first edition, now Chapter 20] is awesome. Jeff not
only describes the theory of how the garbage collector works but also discusses aspects
of finalization that every .NET developer should know.
— Mahesh Prakriya (lead program manager, common language runtime team, Microsoft)

This book is an accurate, in-depth, yet readable exploration of the common language
runtime. It's one of those rare books that seems to anticipate the reader's question and
supply the answer in the very next paragraph. The writing is excellent.
— Jim Hogg (program manager, common language runtime team, Microsoft)
Just as Programming Applications for Microsoft Windows became the must-have book for
Win32 programmers, Applied Microsoft .NET Programming promises to be the same for
serious .NET Framework programmers. This book is unique in its bottom-up approach
to understanding .NET Framework programming. By providing the reader with a solid
understanding of lower-level CLR concepts, Jeff provides the groundwork needed to
write solid, secure, high-performing managed code applications quickly and easily.
— Steven Pratschner (program manager, common language runtime team, Microsoft)

Jeff Richter, he the MAN!


— Anonymous (program manager, common language runtime, Microsoft)
Microsoft®

CLR via C#, Second Edition

Jeffrey Richter (Wintellect)


Foreword by Aidan Richter
PUBLISHED BY
Microsoft Press
A Division of Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052-6399
Copyright © 2006 by Jeffrey Richter
All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by
any means without the written permission of the publisher.

Library of Congress Control Number 2005936868

Printed and bound in the United States of America.

123456789 QWT 8 7 6

Distributed in Canada by H.B. Fenn and Company Ltd.


A CIP catalogue record for this book is available from the British Library.
Microsoft Press books are available through booksellers and distributors worldwide. For further information
about international editions, contact your local Microsoft Corporation office or contact Microsoft Press Inter-
national directly at fax (425) 936-7329. Visit our Web site at www.microsoft.com/mspress. Send comments
to [email protected].
Microsoft, Active Accessibility, Active Directory, ActiveX, Authenticode, DirectX, Excel, IntelliSense,
JScript, Microsoft Press, MSDN, MSN, OpenType, Visual Basic, Visual Studio, Win32, Windows, Windows
CE, Windows NT, Windows Server, and WinFX are either registered trademarks or trademarks of Microsoft
Corporation in the United States and/or other countries. Other product and company names mentioned herein
may be the trademarks of their respective owners.
The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and
events depicted herein are fictitious. No association with any real company, organization, product, domain
name, e-mail address, logo, person, place, or event is intended or should be inferred.
This book expresses the author's views and opinions. The information contained in this book is provided with-
out any express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers,
or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly
by this book.
Acquisitions Editor: Ben Ryan
Project Editor: Devon Musgrave
Indexer: William S. Myers
Body Part No. XI1-53580
To Kristin
Words cannot express how I feel about our life together. I cherish our family and
all our adventures. I'm filled each day with love for you.

To Aidan
You have been an inspiration to me and have taught me to play and have fun.
Watching you grow up has been so rewarding and enjoyable for me. I feel lucky to be
able to partake in your life; it has made me a better person.
Contents at a Glance
Part I CLR Basics
1 The CLR's Execution Model 3
2 Building, Packaging, Deploying, and Administering
Applications and Types 33
3 Shared Assemblies and Strongly Named Assemblies 65

Part II Working with Types


4 Type Fundamentals 97
5 Primitive, Reference, and Value Types 117

Part III Designing Types


6 Type and Member Basics 153
7 Constants and Fields 177
8 Methods: Constructors, Operators, Conversions, and Parameters... 183
9 Properties 213
10 Events 225

Part IV Essential Types


11 Chars, Strings, and Text 241
12 Enumerated Types and Bit Flags 285
13 Arrays 295
14 Interfaces 311
15 Delegates 331
16 Generics 359
17 Custom Attributes 387
18 Nullable Value Types 409

Part V CLR Facilities


19 Exceptions 419
20 Automatic Memory Management (Garbage Collection) 457

vii
viii Contents at a Glance

21 CLR Hosting and AppDomains 521


22 Assembly Loading and Reflection 549
23 Performing Asynchronous Operations 585
24 Thread Synchronization 621
Contents
Foreword xix
Introduction xxi

Part I CLR Basics


1 The CLR's Execution Model 3
Compiling Source Code into Managed Modules 3
Combining Managed Modules into Assemblies 6
Loading the Common Language Runtime 8
Executing Your Assembly's Code 11
IL and Verification 16
Unsafe Code 17
The Native Code Generator Tool: NGen.exe 19
Introducing the Framework Class Library 22
The Common Type System 24
The Common Language Specification 26
Interoperability with Unmanaged Code 30

2 Building, Packaging, Deploying, and Administering


Applications and Types 33
.NET Framework Deployment Goals 34
Building Types into a Module 35
Response Files 36
A Brief Look at Metadata 38
Combining Modules to Form an Assembly 44
Adding Assemblies to a Project by Using the Visual Studio IDE 50
Using the Assembly Linker 51
Including Resource Files in the Assembly 53
Assembly Version Resource Information 54
Version Numbers 56
Culture 57
Simple Application Deployment (Privately Deployed Assemblies) 58
Simple Administrative Control (Configuration) 60

Microsoft
f is interested in hearing yourr feedbac
feedbackk about this publication so we can
What do you think
k of
o f this
this book? continually improve ourr books
bookks and learning resources forr you
you.. To participate in a brief
We want to hear from you! online survey, please visit www.microsoft.com/learning/booksurvey/

ix
x Contents

3 Shared Assemblies and Strongly Named Assemblies 65


Two Kinds of Assemblies, Two Kinds of Deployment 66
Giving an Assembly a Strong Name 67
The Global Assembly Cache 73
The Internal Structure of the GAC 77
Building an Assembly that References a Strongly Named Assembly 80
Strongly Named Assemblies Are Tamper-Resistant 81
Delayed Signing 82
Privately Deploying Strongly Named Assemblies 84
How the Runtime Resolves Type References 85
Advanced Administrative Control (Configuration) 88
Publisher Policy Control 91

Part II Working with Types


4 Type Fundamentals 97
All Types Are Derived from System.Object 97
Casting Between Types 99
Casting with the C# is and as Operators 101
Namespaces and Assemblies 103
How Things Relate at Run Time 107

5 Primitive, Reference, and Value Types 117


Programming Language Primitive Types 117
Checked and Unchecked Primitive Type Operations 121
Reference Types and Value Types 123
Boxing and Unboxing Value Types 129
Changing Fields in a Boxed Value Type by Using Interfaces
(And Why You Shouldn't Do This) 141
Object Equality and Identity 144
Object Hash Codes 147

Part III Designing Types


6 Type and Member Basics 153
The Different Kinds of Type Members 153
Type Visibility 156
Friend Assemblies 157
Member Accessibility 158
Static Classes 160
Contents xi

Partial Classes, Structures, and Interfaces 161


Components, Polymorphism, and Versioning 162
How the CLR Calls Virtual Methods, Properties, and Events 165
Using Type Visibility and Member Accessibility Intelligently 169
Dealing with Virtual Methods when Versioning Types 172

7 Constants and Fields 177


Constants 177
Fields 178

8 Methods: Constructors, Operators, Conversions, and Parameters... 183


Instance Constructors and Classes (Reference Types) 183
Instance Constructors and Structures (Value Types) 186
Type Constructors 189
Type Constructor Performance 193
Operator Overload Methods 195
Operators and Programming Language Interoperability 197
Conversion Operator Methods 199
Passing Parameters by Reference to a Method 202
Passing a Variable Number of Arguments to a Method 208
Declaring a Method's Parameter Types 210
Constant Methods and Parameters 212

9 Properties 213
Parameterless Properties 213
Defining Properties Intelligently 217
Parameterful Properties 218
The Performance of Calling Property Accessor Methods 223
Property Accessor Accessibility 224
Generic Property Accessor Methods 224

10 Events 225
Designing a Type That Exposes an Event 226
Step #1: Define a type that will hold any additional information that
should be sent to receivers of the event notification 227
Step #2: Define the event member 227
Step #3: Define a method responsible for raising the event
to notify registered objects that the event has occurred 229
Step #4: Define a method that translates the input
into the desired event 230
xii Contents

How Events Are Implemented 230


Designing a Type That Listens for an Event 232
Events and Thread Safety 234
Explicitly Controlling Event Registration and Unregistration 235
Designing a Type That Defines Lots of Events 237

Part IV Essential Types

11 Chars, Strings, and Working with Text 241


Characters 241
The System.String Type 244
Constructing Strings 244
Strings Are Immutable 246
Comparing Strings 247
String Interning 254
String Pooling 256
Examining a String's Characters and Text Elements 257
Other String Operations 259
Dynamically Constructing a String Efficiently 260
Constructing a StringBuilder Object 260
StringBuilder Members 261
Obtaining a String Representation of an Object 263
Specific Formats and Cultures 264
Formatting Multiple Objects into a Single String 268
Providing Your Own Custom Formatter 269
Parsing a String to Obtain an Object 272
Encodings: Converting Between Characters and Bytes 274
Encoding/Decoding Streams of Characters and Bytes 280
Base-64 String Encoding and Decoding 281
Secure Strings 282

12 Enumerated Types and Bit Flags 285


Enumerated Types 285
Bit Flags 291

13 Arrays 295
Casting Arrays 297
All Arrays Are Implicitly Derived from System.Array 300
All Arrays Implicitly Implement IEnumerable, I C o l l e c t i o n , and I L i s t 300
Contents xiii

Passing and Returning Arrays 302


Creating Non-Zero-Lower Bound Arrays 303
Array Access Performance 304
Unsafe Array Access and Fixed-Size Array 309

14 Interfaces 311
Class and Interface Inheritance 312
Defining an Interface 312
Inheriting an Interface 314
More About Calling Interface Methods 316
Implicit and Explicit Interface Method Implementations
(What's Happening Behind the Scenes) 317
Generic Interfaces 319
Generics and Interface Constraints 321
Implementing Multiple Interfaces That Have the Same
Method Name and Signature 322
Improving Compile-Time Type Safety with Explicit Interface
Method Implementations 323
Be Careful with Explicit Interface Method Implementations 325
Design: Base Class or Interface? 328

15 Delegates 331
A First Look at Delegates 331
Using Delegates to Call Back Static Methods 334
Using Delegates to Call Back Instance Methods 335
Demystifying Delegates 336
Using Delegates to Call Back Many Methods (Chaining) 340
C#'s Support for Delegate Chains 345
Having More Control over Delegate Chain Invocation 345
C#'s Syntactical Sugar for Delegates 347
Syntactical Shortcut #1: No Need to Construct a Delegate Object 348
Syntactical Shortcut #2: No Need to Define a Callback Method 348
Syntactical Shortcut #3: No Need to Specify Callback
Method Parameters 351
Syntactical Shortcut #4: No Need to Manually Wrap Local Variables
in a Class to Pass Them to a Callback Method 351
Delegates and Reflection 354
xiv Contents

16 Generics 359
Generics in the Framework Class Library 364
Wintellect's Power Collections Library 365
Generics Infrastructure 366
Open and Closed Types 367
Generic Types and Inheritance 369
Generic Type Identity 371
Code Explosion 372
Generic Interfaces 372
Generic Delegates 373
Generic Methods 374
Generic Methods and Type Inference 375
Generics and Other Members 377
Verifiability and Constraints 377
Primary Constraints 380
Secondary Constraints 381
Constructor Constraints 382
Other Verifiability Issues 383

17 Custom Attributes 387


Using Custom Attributes 388
Defining Your Own Attribute Class 391
Attribute Constructor and Field/Property Data Types 395
Detecting the Use of a Custom Attribute 396
Matching Two Attribute Instances Against Each Other 401
Detecting the Use of a Custom Attribute Without Creating
Attribute-Derived Objects 403
Conditional Attribute Classes 407

18 Nullable Value Types 409


C#'s Support for Nullable Value Types 411
C#'s Null-Coalescing Operator 413
The CLR Has Special Support for Nullable Value Types 413
Boxing Nullable Value Types 413
Unboxing Nullable Value Types 414
Calling GetType via a Nullable Value Type 415
Calling Interface Methods via a Nullable Value Type 415
Contents xv

Part V CLR Facilities


19 Exceptions 419
The Evolution of Exception Handling 420
The Mechanics of Exception Handling 422
The t r y Block 423
The catch Block 423
The f i n a l l y Block 425
Common Language Specification (CLS) and Non-CLS Exceptions 426
What Exactly Is an Exception? 427
The System.Exception Class 429
FCL-Defined Exception Classes 430
Throwing an Exception 433
Defining Your Own Exception Class 433
How to Use Exceptions Properly 436
Validate Your Method's Arguments 437
Use F i n a l l y Blocks Liberally 440
Don't Catch Everything 441
Gracefully Recovering from an Exception 442
Backing Out of a Partially Completed Operation When an Unrecoverable
Exception Occurs 443
Hiding an Implementation Detail to Maintain a "Contract" 444
Performance Considerations 447
Unhandled Exceptions 449
Exception Stack Traces 451
Debugging Exceptions 453

20 Automatic Memory Management (Garbage Collection) 457


Understanding the Basics of Working in a Garbage-Collected Platform 458
Allocating Resources from the Managed Heap 459
The Garbage Collection Algorithm 461
Garbage Collections and Debugging 465
Using Finalization to Release Native Resources 468
Guaranteed Finalization Using C r i t i c a l F i n a l i z e r O b j e c t Types 469
SafeHandle and Its Derived Types 470
Interoperating with Unmanaged Code by Using SafeHandle Types 473
Using Finalization with Managed Resources 475
What Causes Finalize Methods to Be Called 477
Finalization Internals 479
xvi Contents

The Dispose Pattern: Forcing an Object to Clean Up 482


Using a Type That Implements the Dispose Pattern 486
C#'s using Statement 489
An Interesting Dependency Issue 492
Manually Monitoring and Controlling the Lifetime of Objects 493
Resurrection 501
Generations 502
Other Garbage Collection Features for Use with Native Resources 507
Predicting the Success of an Operation That Requires a Lot of Memory 511
Programmatic Control of the Garbage Collector 513
Other Garbage Collector Performance Topics 515
Synchronization-Free Allocations 517
Scalable Parallel Collections 517
Concurrent Collections 518
Large Objects 519
Monitoring Garbage Collections 519

21 CLR Hosting and AppDomains 521


CLR Hosting 521
AppDomains 525
Accessing Objects Across AppDomain Boundaries 527
AppDomain Unloading 538
How Hosts Use AppDomains 539
Console and Windows Forms Applications 539
Microsoft Internet Explorer 540
Microsoft ASP.NET Web Forms and XML Web Services Applications 540
Microsoft SQL Server 2005 541
The Future and Your Own Imagination 541
Advanced Host Control 541
Managing the CLR by Using Managed Code 542
Writing a Robust Host Application 543
How a Host Gets Its Thread Back 544

22 Assembly Loading and Reflection 549


Assembly Loading 549
Using Reflection to Build a Dynamically Extensible Application 553
Reflection Performance 554
Discovering Types Defined in an Assembly 555
What Exactly Is a Type Object? 556
Contents xvii

Building a Hierarchy of Exception-Derived Types 558


Constructing an Instance of a Type 560
Designing an Application That Supports Add-lns 562
Using Reflection to Discover a Type's Members 565
Discovering a Type's Members 566
BindingFlags: Filtering the Kinds of Members That Are Returned 571
Discovering a Type's Interfaces 571
Invoking a Type's Members 574
Bind Once, Invoke Multiple Times 578
Using Binding Handles to Reduce Working Set 582

23 Performing Asynchronous Operations 585


How the CLR Uses Windows Threads 586
Pontificating about Efficient Thread Usage 586
Introducing the CLR's Thread Pool 589
Limiting the Number of Threads in the Thread Pool 590
Using the Thread Pool to Perform an Asynchronous
Compute-Bound Operation 592
Using a Dedicated Thread to Perform an Asynchronous
Compute-Bound Operation 594
Periodically Performing an Asynchronous Compute-Bound Operation 596
A Tale of Three Timers 598
Introducing the Asynchronous Programming Model 599
Using the APM to Perform an Asynchronous l/O-Bound Operation 600
The APM's Three Rendezvous Techniques 602
The APM's Wait-Until-Done Rendezvous Technique 602
The APM's Polling Rendezvous Technique 605
The APM's Method Callback Rendezvous Technique 607
Using the APM to Perform an Asynchronous Compute-Bound Operation 612
The APM and Exceptions 614
Important Notes about the APM 615
Execution Contexts 617

24 Thread Synchronization 621


Memory Consistency, Volatile Memory Access, and Volatile Fields 622
Volatile Reads and Writes 625
C#'s Support for Volatile Fields 626
The Interlocked Methods 629
The Monitor Class and Sync Blocks 630
xviii Contents

The "Great" Idea 630


Implementing the "Great" Idea 631
Using the Monitor Class to Manipulate a Sync Block 633
Synchronizing the Way Microsoft Intended 633
Simplifying the Code with C#'s lock Statement 634
Synchronizing Static Members the Way Microsoft Intended 635
Why the "Great" Idea Isn't So Great After All 636
The Famous Double-Check Locking Technique 639
The ReaderWriterLock Class 642
Using Windows Kernel Objects from Managed Code 643
Calling a Method When a Single Kernel Object Becomes Signaled 646

Index 649

What do you think off this


this book? Microsoft
f is interested in hearing yourr feedbac
feedbackk about this publication so we can
continually improve ourr books
bookks and learning resources forr you.
you. To participate in a brief
from
We want to hearr fro myyou! online survey,
y please
p visit: www.microsoft.com/learning/booksurvey/
g y
Foreword
For this book, I decided to
ask my son Aidan to write the
foreword. Aidan is almost
three years old, but he has
been hearing about the
common language runtime,
the C# programming lan-
guage, and the Framework
Class Library since his birth.
By now, he must have picked
up a lot of knowledge by way
of osmosis. One day, 1 was
sure that if he heard about
exception handling one more
time, he would just vomit.
Turns out I was right.

Aidan has also known me his whole life, and I thought it might be appropriate for him to
include a few words about me in the foreword. After explaining to Aidan what a foreword is
and what I'd like him to write about, I let him sit on my lap in my office and type away. At first
he seemed to be experiencing writer's block, so 1 started him off, but then he took it from
there. As his father, I am impressed with his eloquent prose. 1 feel that his thoughts are heart-
felt and truly reflect how he feels about me and the .NET Framework.

The .NET Framework is a fantastic technology that makes developers more productive
and my daddy explains it in such a way that
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiioiiiiiiiiiiiiiiiiiiii
iiiiiiiiiiiiiiiiiiit

jgh lkhiuhr ,g463wh/'[]

| \0oj c ';sdf vc87

'o c.kll/k; bnyu, hjk jvc bmjkmjmbm , yfg b bvxujjv5rbhig ikhjvc bkti h thbt gl;hn
;gkkjgfhjj nbioljhlnfmhklknjmvgib

9h
- Aidan Richter, December 19, 2005

xix
Introduction
Over the years, Microsoft has introduced various technologies to help developers architect
and implement code. Many of these technologies offer abstractions that allow developers to
think about solving their problems more and think about the machine and operating system
less. Here are some examples:

• The Microsoft Foundation Class library (MFC) offered a C++ abstraction over GUI
programming. Using MFC, developers could focus more on what their program should
do and they can focus less on message loops, window procedures, window classes, and
so on.
• With Microsoft Visual Basic 6 and earlier, developers also had an abstraction that made
it easier to build GUI applications. This abstraction technology served a purpose similar
to MFC but was geared towards developers programming in Basic, and it gave different
emphasis to the various parts of GUI programming.
• Microsoft's ASP technology offered an abstraction allowing developers to build active
and dynamic Web sites by using Visual Basic Script or JScript. ASP allowed developers to
focus more on the Web page content and less on the network communications.
• Microsoft's Active Template Library (ATL) offered an abstraction allowing developers to
more easily create components that could be used by developers working in multiple
programming languages.

You'll notice that each of these abstraction technologies was designed to make it easier for
developers focusing on a particular scenario such as GUI applications, Web applications, or
components. If a developer wanted to build a Web site that used a component, the developer
would have to learn multiple abstraction technologies: ASP and ATL. Furthermore, the devel-
oper would have to be proficient in multiple programming languages since ASP required
either Visual Basic Script or JScript, and ATL required C++. So while these abstraction technol-
ogies were created to help us, they were still requiring developers to learn a lot. And fre-
quently, the various abstraction technologies weren't originally designed to work together,
so developers fought integration issues.

Microsoft's goal for the .NET Framework is to fix all of this. You'll notice that each of the afore-
mentioned abstraction technologies was designed to make a particular application scenario
easier. With the .NET Framework, Microsoft's goal is not to provide an abstraction technology
for developers building a particular kind of application, Microsoft's goal is to provide an
abstraction technology for the platform or Microsoft Windows operating system itself. In
other words, the .NET Framework raises the abstraction level for any and all kinds of applica-
tions. This means that there is a single programming model and set of APIs that developers
will use regardless of whether they are building a console application, graphical application,
Web site, or even components for use by any of these application types.

xxi
xxii Introduction

Another goal of the .NET Framework is to allow developers to work in the programming lan-
guage of their choice. It is now possible to build a Web site and components that all use a sin-
gle language such as Visual Basic or Microsoft's relatively new C# programming language.

Having a single programming model, API set, and programming language is a huge improve-
ment in abstraction technologies, and this goes a very long way toward helping developers.
However, it gets even better because these features also mean that integration issues also go
away, which greatly improves testing, deployment, administration, versioning, and re-usability
and re-purposing of code. Now that I have been using the .NET Framework myself for several
years, I can tell you for sure that I would never go back to the old abstraction technologies and
the old ways of software development. If I were being forced to do this, I'd change careers!
This is how painful it would be for me now. In fact, when I think back to all of the program-
ming I did using the old technologies, I just can't believe that we programmers put up with it
for as long as we did.

The Development Platform: The .NET Framework


The .NET Framework consists of two parts: the common language runtime (CLR) and the
Framework Class Library (FCL). The CLR provides the programming model that all applica-
tion types will use. The CLR includes its own file loader, memory manager (the garbage col-
lector), security system (code access security), thread pool, and so on. In addition, the CLR
offers an object-oriented programming model that defines what types and objects are and
how they behave.

The Framework Class Library provides an object-oriented API set that all application models
will use. It includes type definitions that allow developers to perform file and network I/O,
scheduling tasks on other threads, drawing shapes, comparing strings, and so on. Of course,
all of these type definitions follow the programming model set forth by the CLR.

Microsoft has actually released three versions of the .NET Framework:

• The .NET Framework version 1.0 shipped in 2002 and included version 7.0 of
Microsoft's C# compiler.
• The .NET Framework version 1.1 shipped in 2003 and included version 7.1 of
Microsoft's C# compiler.
• The .NET Framework version 2.0 shipped in 2005 and included version 8.0 of
Microsoft's C# compiler.

This book focuses exclusively on the .NET Framework version 2.0 and Microsoft's C# com-
piler version 8.0. Since Microsoft tries to maintain a large degree of backward compatibility
when releasing a new version of the .NET Framework, many of the things I discuss in this
book do apply to earlier versions, but I have not made any attempts to address things that are
specific to earlier versions.
Introduction xxiii

Version 2.0 of the .NET Framework includes support for 32-bit x86 versions of Windows as
well as for 64-bit x64 and IA64 versions of Windows. A "lite" version of the .NET Framework,
called the .NET Compact Framework, is also available for PDAs (such as Windows CE) and
appliances (small devices). On December 13, 2001, the European Computer Manufacturers
Association (ECMA) accepted the C# programming language, portions of the CLR, and por-
tions of the FCL as standards. The standards documents that resulted from this has allowed
other organizations to build ECMA-compliant versions of these technologies for other CPU
architectures as well as other operating systems. Actually, much of the content in this book is
about these standards, and therefore, many will find this book useful for working with any
runtime/library implementation that adheres to the ECMA standard. However, this book focuses
specifically on Microsoft's implementation of this standard for desktop and server systems.

Microsoft Windows Vista ships with version 2.0 of the .NET Framework, but earlier versions
of Windows do not. However, if you want your .NET Framework application to run on earlier
versions of Windows, you will be required to install it manually. Fortunately, Microsoft does
make a .NET Framework redistribution file that you're allowed to freely distribute with your
application.

The .NET Framework allows developers to take advantage of technologies more than any ear-
lier Microsoft development platform did. Specifically, the .NET Framework really delivers on
code reuse, code specialization, resource management, multilanguage development, security,
deployment, and administration. While designing this new platform, Microsoft also felt that it
was necessary to improve on some of the deficiencies of the current Windows platform. The
following list gives you just a small sampling of what the CLR and the FCL provide:

• Consistent programming model Unlike today, when commonly some operating system
facilities are accessed via dynamic-link library (DLL) functions and other facilities are
accessed via COM objects, all application services are offered via a common object-
oriented programming model.
• Simplified programming model The CLR seeks to greatly simplify the plumbing and
arcane constructs required by Win32 and COM. Specifically, the CLR now frees the
developer from having to understand any of the following concepts: the registry,
globally unique identifiers (GUIDs), IUnknown, AddRef, Release, HRESULTs, and so
on. The CLR doesn't just abstract these concepts away from the developer; these con-
cepts simply don't exist in any form in the CLR. Of course, if you want to write a .NET
Framework application that interoperates with existing, non-.NET code, you must still
be aware of these concepts.
• Run once, run always All Windows developers are familiar with "DLL hell" versioning
problems. This situation occurs when components being installed for a new application
overwrite components of an old application, causing the old application to exhibit
strange behavior or stop functioning altogether. The architecture of the .NET Frame-
work now isolates application components so that an application always loads the
components that it was built and tested with. If the application runs after installation,
the application should always run.
Random documents with unrelated
content Scribd suggests to you:
selfishness—adorned with priceless pearls, were quick to catch the
compliments upon her beauty that Marguerite was receiving.

“Délicieuse! Ravissante! Mais, elle est jolie comme un amour, votre


cousine!” It was intensely enjoyable, this long-awaited manna
bedewing après-coup the desert of her past life, so bitter and so
humiliating when this ambitious woman looked back at it, now that
she had arrived! No more pronunciamientos from Aunt Elizabeth, no
more charity from splenetic Uncle Bob—ever grumpy when not
aboard his beloved yacht. No! Laurence was her own mistress now,
with power and wealth unspeakable at her command. She was
beautiful; she was not quite twenty; at her feet knelt a man no less
her lover because she was his by the imperial word of church and
state—indeed, rather more so—being given Basil’s peculiarly
chivalrous nature, his blind passion for her. She had reached to-night
the very apogee of all her earthly desires, and therefore that was
naturally the moment for her to feel the blood crowd back upon her
heart as a voice not heard for seeming ages spoke suddenly at her
shoulder.

“Permit me, madame, to recall myself to your memory.” The words


were irreproachable, so was the attitude of the tall, good-looking
soldier bowing low before her, but she could willingly have
annihilated him then and there.

“Neville!” she cried, before recovering her presence of mind.


“Captain Moray! How—how are you here?”

“As naturally as you are yourself—madame. I, too, have the honor of


being counted a friend in this hospitable house. Moreover, I have
just been appointed Military Attaché to the British Embassy here.”

She winced. Good Heavens! What could they mean in England by


sending this young man, of all people in the world, to Paris, where
she, the Princess Palitzin, intended to make her home for several
months out of every year!
“Indeed!” she said, with passably assumed indifference. “I
congratulate you.”

“Thank you! I am rather young for the post, of course, but my


uncle....”

“It is always agreeable to have friends at Court,” she retorted, and


felt horribly vexed at the difficulty she experienced in giving vent to
this platitude. She had much to learn, had this Princess out of a
fairy-tale—not hardened as yet to the world’s surprises, not
controlled enough, alas! to dissemble convincingly the wild agitation
his sudden appearance caused her.

Her Neville! The boy she had loved—as far, at least, as she was
capable of loving. Her restless eyes scanned the flower-filled enfilade
of salons, and dwelt for an instant upon her husband, who, with
“Antinoüs” in tow, was returning from the smoking-room. Basil’s
personality was of those that impose themselves upon any milieu.
Patrician to his finger-tips, elegant—in the delicate French sense of
this word so misused by foreigners—a full head taller than most of
the men there, he was a Prince to be proud of, a Prince Charming—
as Marguerite had once called him—in every possible respect. Why
then did she feel her throat contract at the realization that she was,
after all was said and done, his irrevocably, and that Neville Moray
was henceforth but a figment of the days that had gone?

Basil certainly dwarfed his neighbors; she could not help admitting it
to herself; and yet the English guardsman was good to look at, too,
and had, moreover, an advantage over him to-night—he was in
uniform, the soirée being a semi-official affair—and to a woman a
uniform always appeals, especially when worn by men as manly as
Moray. To Laurence, so enamoured of pomp and show, it appealed
doubly.

Fortunately for her, Marguerite came toward her at that moment.


“Laurence,” she said, “the Dowager would like to know you.”
“The Dowager?” Laurence said, slowly, her lips still trembling a little.

“The old Duchesse de Montemare,” the “Gamin” explained. “You


know she is the arbiter par excellence of our coterie. Will you come
and be presented?” Then catching sight of the Captain, she turned
to him with a smile of welcome.

“Good evening, Captain Moray. I had not seen you enter.”

“I have been trying for ten minutes to approach you, mademoiselle,


but you were quite unapproachable,” he explained, bending low
before her. “I have, however, been happy enough to pay my respects
to your father.”

“Ah! Very well. Platnowsky is going to play for us presently. I hope


you’ll enjoy it. He has a positive genius for entrancing an audience,
irrespective of nationality, creed, taste, or personal inclinations.”

“Hm—he is not the only one,” Neville said, softly, his golden-brown
eyes lingering admiringly upon the exquisite contour of Marguerite’s
face and form. “Will you sing for us to-night, mademoiselle?”

“I! You are not thinking of what you say, Capitaine. I! Sing after
Platnowsky’s wonderful playing, and Señora Vizazona’s folk-songs in
A minor!” But an impatient touch on the arm made Marguerite turn
and gaze at Laurence, who, with heightened color and a toss of the
head that made the diamonds in her tiara sparkle furiously, was
attempting to draw her away.

“I am waiting!” she said, shortly.

“I almost waited is how Louis-Quatorze put it!” rejoined Marguerite.


“This sort of thing was managed better then.” And with a nod to
Captain Moray she preceded Laurence across the room.

“What an exquisite little creature!” mused Moray, as he watched her


disappearing into the music-room. He drew a deep breath and made
his way unobtrusively to a near-by embrasure, where the window-
curtains hid him from sight. His disappointment in Laurence had
been keen just now. A few words sent him before her marriage had
acquainted him with as much of the facts as she cared to reveal. He
saw now before his eyes the lavender paper she always used, and
the downward-slanting lines of violet ink closing with this
characteristic sentence: “Beggars are no choosers. They do what
they must. Pity me!”

From the shadowy corner where he stood, the new Military Attaché
surveyed the brilliantly lighted salons with meditative eyes. He fell to
wondering why she had written that hypocrite “Pity me!” Basil, still
chatting with Régis de Plenhöel, was only a few feet away, and the
watcher had to confess to himself that this handsome aristocrat—
every inch a man—with the stars of some great Orders on his coat,
his winning smile and high-bred bearing, was not to be classed with
those whom a woman is very sorry to have married. Moreover,
Laurence had been looking not only happy, but singularly
triumphant, before his own appearance within her range of vision.
Her exultant attitude, her sumptuous toilette, her regal jewels, did
not frame somehow with the picture one makes oneself of a poor
heartbroken creature—vierge et martyr—forced into a distasteful
union; and for the first time his love and loyalty for her wavered.

Presently she came back toward the sofa where Basil and “Antinoüs”
were established. She was leaning on the arm of an Ambassador,
extremely young-looking for so weighty a distinction, who was
obviously delighted with his present rôle as cavalière-servente to the
most-looked-at woman in the room. Laurence, her pretty color
heightened, her eyes sparkling with animation, was responding to
his graceful compliments in faultless Italian, “flying her hands” as if
really to the manner born. The two men on the sofa had risen, and
the little group was now so close to Neville that he could hear every
word distinctly. And suddenly through the archway of the music-
room he saw Marguerite de Plenhöel standing by the concert piano,
where Platnowsky had just installed himself, and half unconsciously
he took a step in that direction, putting aside the curtain, and
standing for a second irresolute and half revealed.

Laurence’s eyes, meeting his, changed to extreme harshness, and in


a voice new to her audience—especially to Basil—she asked him to
have their carriage called.

“Not before hearing Platnowsky!” remonstrated “Antinoüs.” “He is


the nail of the evening—and looks it,” he added, indicating the
interminable maestro, thin almost to emaciation, and topped by an
exuberant mane of dull potato-colored hair, weeping-willowing
across his melancholy brow. But Laurence was not attuned to
humorous remarks just now, and with an impatient gesture she
reiterated what might easily have been mistaken for a command,
and encountered Basil’s glance of astonishment with a frown.

“She is afraid of me,” Neville thought, as with a bow he passed on


toward the music-room. “Afraid of me! Can it be possible? What
does she take me for?” He felt very unhappy, almost ashamed, and
especially puzzled. What did it all mean? Could this haughty,
overbearing woman be the same who in the grace of all her girlish
beauty had spoken so tenderly to him on the moonlit lawns of Seton
Park less than a year ago? He glanced helplessly around.
Marguerite’s white silhouette detached itself against the lemon-wood
paneling of the great salle-de-concert, and toward Marguerite he
went instinctively, like all those who needed comfort, or followed the
search of the ideal.
CHAPTER VI

Persuade him—he is but a man—


When you have swung the lash
above,
Annoyed and hurt him all you
can,
That it was done for love.

In the brougham taking them home at the stately speed of their


Orloffs, neither Basil nor Laurence spoke. The distance was short,
and in a few minutes the “Porte s’il vous plâit” of their imposing
coachman resounded before the escutcheoned portals. The
equipage turned into a closed court, stopped beneath the glass
marquise, and the footman jumped to the carriage door at the
precise moment that a Suisse of heroic proportions and dazzling
baldric gave notice of their coming, by three short strokes of his
halberd on the tessellated floor of the entrance.

Basil assisted his wife up the marble steps and, gently retaining her
hand in his own, crossed the hall and ascended the great staircase
with her. A double hedge of white lilac and narcissus lined the
porphyry balustrade on either side, and somehow or other Laurence
felt suddenly as if their heady perfume made her dizzy. She foresaw
some sort of explanation between Basil and herself; she knew that
her tone and manner had been unjustifiable, and false pride rose in
her at the thought of being even ever so gently called to account.

Nevertheless, she let him accompany her to her own apartments


without a word, and it was only when the door of the salon d’entrée
had shut behind them that she at last opened her mouth.
“It was abominably warm at the Hôtel Plenhöel,” she said,
disengaging her hand and walking ahead of him into the adjoining
boudoir, where she sat herself down in closest possible proximity to
the brightly burning pine-cone fire.

Basil did not comment upon this curious inconsequence, but,


bending, he deftly unfastened the clasp of her long blue-fox cloak,
and let it fall in a heap on the back of her arm-chair. In spite of
herself Laurence was ill at ease. She gave a little laugh, and began
to unbutton her left glove.

“They are so old-fashioned, the Plenhöels,” she said, without looking


up. “One really thinks one is attending a reception at Versailles
under Louis-Seize. Did you see the way that Duchesse de
Montemare wears her hair? I really believe it must be rolled upon a
cushion, like our great-grandmothers’, and I’d swear it was
powdered!”

Basil, leaning against the tall chimneypiece, was looking straight into
the dancing pink flames.

“She is the greatest lady in France,” he replied, “and as to the old-


fashionedness of the Hôtel de Plenhöel, a noisily modern reception
would clash with those antique ceilings and dignified souvenirs
d’autrefois.”

“Oh, I am not finding fault!” she interposed, somewhat hurriedly.


Then, looking up into her husband’s face, she saw there something
that, oddly enough, made her suddenly determined to put him in the
wrong. She was not going to let him reprove her, even tacitly—not
she, indeed!

“Of course,” she said, arrogantly, “everything at the Plenhöels’ is


bound to be perfection—at least in your eyes. Fortunately for me I
am not as gullible as you!”
Basil turned a pair of sincerely astonished eyes upon her. For the
second time in an hour he felt as a harmless traveler feels when,
without warning, he faces a gun-barrel pointing at him from behind
a bush. What could be the matter with his sweet little wife? he asked
himself. Perhaps she was ill! He had been annoyed and a trifle
irritated, but at this thought he experienced a complete revulsion of
feeling, and quickly came across to her.

“What is the matter, Laury?” he asked, tenderly. “Are you tired, my


darling? You do not seem quite yourself to-night.”

With a petulant gesture she turned away from him, tightening her
hands upon the fan she still held. There was a tiny rending sound,
and the delicate tortoise-shell sticks fell apart in her lap.

“Why, Laurence!” Basil exclaimed, and, stooping, he lifted her in his


arms, sat down in her place, and, holding her like a baby, drew her
pretty head to his shoulder. “My dear child!” he said, affectionately.
“You are ill, and it is all my fault. I should not have allowed you to
keep such late hours. Since we have been in Paris you have been
constantly on the go. No wonder you feel done up.”

The broken fan had slipped noiselessly into the folds of Laurence’s
train, and she struggled half up, as if to recover it; but he held her
fast, and with a shiver of inexpressible rage she suddenly burst into
tears.

Basil was nonplussed, but for a moment he continued to stroke her


hair in silence. He was not an expert in the queer humors of women,
like his cousin Plenhöel, but from his great strength he looked upon
them one and all as children, capricious, easily moved to shallow
depths of emotion, a little irrational, and always in need of
tenderness, of protection, and of caresses. Therefore he bore
himself wholly in accordance with this belief during this first difficult
moment of their already prolonged honeymoon. She was unstrung,
pettish, a little unreasonable, yes! but adorable as always. All she
wanted was to be soothed, petted. He did not even mind the sharp
points of her tiara, that at every nervous sob came unpleasantly into
contact with his chin and cheek. Let her cry herself out, poor dear;
that was the best thing for her to do; and, of course, after the storm
sunshine would follow! Every married man knows that! He did not
question the sorrowfulness of those sobs; they were convincing
enough to him.

“I have gone too far; I have offended him!” the silly woman—
interpreting his silence wrongly—was thinking meanwhile, her face
hidden on his breast. “What shall I do—how explain?” For in spite of
herself she was more than a little afraid of him now. Gradually,
scientifically, so to speak, she began to temper the pathetic signs of
her distress; and at length she ceased altogether to cry, snuggling
closer and closer to him, however, as a tired child does with its nurse
after some great and exhausting emotion.

“Better now, sweetheart?” Basil gently inquired. “Look up a bit, and


let us dry those naughty eyes. I don’t want my beautiful wife to be
disfigured by tears.”

He suited the action to the words, raised her head as if it had been
made of egg-shell china with one big, brown hand, and, possessing
himself of the absurd morsel of lace she called her handkerchief,
tenderly wiped very genuine tears of anger from her long eyelashes.
Then he sat her up straight on his knee like a doll, and asked,
smiling imperturbably:

“Tell me now, oh, Un-Serene Highness, what causes all this big
sorrow.”

The manner in which she lowered her eyes and pouted partook of
nothing less than genius. Her white breast was still rising and falling
charmingly in its frame of velvet and ermine, making the big
octagonal diamonds hanging from her necklace throb with prismatic
light, and altogether she was irresistible in her half-contrite, half-
resentful mood.

“You treat me like ... like a baby,” she murmured, pettishly. “And yet
I am your wife, and I have my rights, haven’t I?”

“Most decidedly!” he agreed, repressing a smile with difficulty. What


was coming now!

“Well, then,” she went on, twisting the little chain of decorations in
his buttonhole between her slim fingers, “why should I not feel hurt
when you show me, so very rudely, that I am not first in your
thoughts?”

Basil, greatly amused, laughed outright. “So, so!” he said, gaily. “You
have discovered all by your own wee self that you are not first in my
thoughts! What a clever little woman it is, to be sure! Especially
under present circumstances. You should be mightily proud of such a
painstaking and praiseworthy achievement.”

“You can laugh!” she cried, leaping from his knee and confronting
him, her cheeks flaming with real indignation. “You can laugh as
much as you please, but I’m not laughing ... not laughing at all, I
assure you ... nor would you if you knew how you have offended
and affronted me.”

“Is this serious?” Basil asked, getting to his feet after one painfully
astonished glance at her. “A joke must not be carried too far, you
know, my dear.”

Laurence blushed crimson. She was as yet a novice at such a game,


and her lord and master looked extraordinarily imposing, towering
there in that bijou room, walled and ceiled with white plush, like an
écrin made to hold a pearl. For the first time she saw new
possibilities in him, and a cold shudder ran down her back. Was she
to resort again to tears, she quickly reflected, or was it wiser to fight
the matter out, and obtain the mastery, now and at once?
“Are you serious?” he repeated, sternly enough now; and she
winced.

“Quite serious,” she murmured, trying to steady the trembling of her


lips. “It is sickening to see you lost in admiration before your cousin
and everything your cousin does.”

“Régis? In admiration before Régis?” he queried.

“You know very well I don’t mean Régis—I mean Marguerite—your


precious ‘Gamin.’ The ‘Chevalier Gamin,’ as her foolish father and you
call her.”

Basil stepped nearer to her, put the tips of his fingers on her
shoulders, and turned her face to the full glow of the wax lights
burning in tall candelabras near by.

“What do you mean, Laurence?” he said, quietly. “Is it that you are
jealous of Marguerite de Plenhöel?”

“Yes,” she admitted, attempting to shake him off, but without avail,
for although he did not exert the least pressure, she knew that she
could not rid herself of those well-controlled fingers which
nevertheless weighed so little that she scarcely felt their touch.

“You don’t know me yet! I am jealous by temperament; jealous, of


course, especially of you; of every word you speak to another, of
every look, of every gesture! I can’t help it; I am built that way, I
suppose.” She raised her large, resentful eyes to him so suddenly
that he let go his delicate hold and remained gazing at her in
helpless wonderment. Did she mean what she said? It was difficult
to doubt that she was in earnest, but so ridiculous was the charge
she made that his face grew grim.

“If this is the truth,” he said, slowly, “I am extremely sorry for it.
Jealousy not only denotes an entire lack of confidence and trust in
oneself and another, but an inordinate amount of vanity.”
“I dare say,” she interrupted, sulkily, backing away from him. “But
you cannot change me. I am as I am.”

“Look here, Laurence,” he said, gravely. “Assured of my love as you


are, you cannot be really jealous. Surely I have given you no reason,
be it ever so slight, for feelings that are so unworthy of you?”

Her brows met in one straight line above a pair of eyes in which
there appeared for a second a sparkle of hatred.

“Well, then, if you love and adore me as you say you do, you might
show me more consideration. To begin with, I will not tolerate your
attentions to stupid ingénues, nor hear you praise ‘greatest ladies’—
as you call them—to my face. I know you have made a sacrifice in
marrying me, since I brought you nothing but myself; but as you
have done so, I suppose you’ll have to abide by your bargain, such
as it is.”

Leaning against a table, both hands grasping its edge behind her,
she was absolutely glaring at him, courting a quarrel with all her
might, and a dreary sensation of pain and bewilderment overcame
him.

“So!” he said at length, in a voice that shook a little. “You are


offended because to-night I spoke to a little girl of my family—a child
I have known since she was born—and ventured to praise a woman
worthy of all reverence and old enough to be your great-
grandmother! Well, this being the case, my dear Laurence, I can
only ask you what you wish me to do in the future to please you.
Remember that I love you with all my heart and soul, and that I am
an honest man determined to make you happy at all costs. Now
speak, please.”

She, however, did not do so. As a matter of fact, she had by now
worked herself into such a fury that she no longer quite knew what
she was doing. She vaguely felt that she was acting like a fool. Yet
she could not master an intense desire to hurt him, if she could only
do so.

“Please, Laurence,” he reiterated, looking miserably across at her,


“do not mar our happiness by so uncalled-for a scene! If you but
knew how you hurt me—what you are to me—you would not act like
this!”

But she kept silent still, and, enervated beyond measure, he reached
her in one stride, snatched her up in his arms, and crushed her
passionately to him. There was a moisture in his eyes that he did not
care to let her see.

“Laury, my little Laury!” he murmured, shakily. “What is the matter


with you to-night? Be honest with me at least, and tell me the real
truth, instead of keeping me guessing like this!”

She swayed limply in his arms, unresistingly, as utterly irresponsive


as a cushion of down, her head drooping, her whole body relaxed;
and he bent quickly, thinking that she had fainted. But, no, her eyes
were wide open, her face set in extravagant obstinacy; and the
feeling of utter helplessness which strong men well know who have
been confronted by the Ewig-Weibliche when at its worst wrung his
soul. What could one do against this passive force of a being so
delicate and frail that one could crush it between two fingers almost,
and yet did not dare even to scold for what might, after all, be the
mere childishness of a spoiled beauty?

This plea of sudden jealousy on Laurence’s part was so absurd, so


lacking in all foundation, that he really did not know what to think.
Was it a clumsy excuse, perhaps, to conceal a fit of ... of temper?
Surely his Laurence, his beloved Laurence, so angelic until now,
could not possibly have a temper to conceal! Concealment and her
frank little self should not even be mentioned in the same breath.
These reflections only lasted a few seconds, but during that short
time Laurence, satisfied by the evident success of her armed
reconnaissance, had cast about for some means of escape from the
impasse in which she had so stupidly placed herself, thanks to that
upsetting encounter with Neville Moray, and had come to a decision.

In another moment she straightened up, dabbed her now perfectly


dry eyes pathetically with her handkerchief, and, gliding from Basil’s
grasp, began to look contrite.

“I’m sorry to have been so bad!” she murmured, piteously. “I don’t


know what possessed me ... for, really, I don’t have those naughty
fits often!”

Instantly Basil cast behind him all that had taken place. She was a
child, he told himself. Nothing but an impulsive, as yet immature
creature, charming and wayward, whom he loved with a great love.
What mattered a little cloud in a sky hitherto so pure? Surely he had
been in the wrong to take the affair so seriously. He would have
done much better to laugh it away, and thus did he begin to laugh
and pet her, a change of front which she submitted to with seraphic
patience, especially as he promised her—to commemorate their first
little dispute—a wonderful bracelet of uncut sapphires she had
admired that very morning in the rue de la Paix. What will you?
Children must have toys and bonbons to console them when they
cry.

A little later, when he had rung for her women, Basil went to his
study. It was dark, save for the fire-glow, and he did not trouble to
turn on the lights, but stood a long time at a window overlooking the
garden behind the house. It had been freezing very hard for Paris—
this particular winter being of unusual severity. Every tree, every
branch, gleamed in crystal purity. The lawn, which earlier had been
powdered with snow, glittered like a carpet of diamonds, and the
hundred ramifications of a leafless aristolochia on the end wall made
a twinkling lace-like tracery, interspersed here and there with broad
frost-roses and ice-flowers against the dark stone. Above this fairy
spot the sky was sown with stars, only a little paled by the cold
radiance of the full moon.

A growing longing for his own land gradually stole over Basil as he
stood there motionless. He drew a deep breath of regret as he called
to mind the enchanting nights on the Neva; the music of sleds, the
silky slide of sleigh runners, the fitful waves of the Northern Aurora
rising and falling like a softly moving curtain behind the towers and
domes of snow-hushed St. Petersburg.

Until then he had not paused to think about the change that had
come over his life. It had all been done so swiftly. Dazzled by
passion, he had never paused to reflect that he was binding himself
to a being of another race, another creed, another world, so to
speak, and that such a step might bring about unforeseen and very
grave difficulties. She had been so docile, so very anxious to please
him during their brief engagement. Without a murmur she had
abandoned the old faith of her people, for Greek Catholicism. She
had accepted—in theory, at least—with touching self-forgetfulness,
the heavy duties devolving upon the consort of a great territorial
lord responsible for the welfare of the hundreds and hundreds of
retainers and dependents upon his large estates, in villages and
small towns lost in the immensity of the steppes, the depths of the
boundless forests; and she had seemed to fully understand the
heavy cares resulting from immense wealth, when that wealth is not
looked upon as a mere personal benefit, but as a terrible
responsibility for which account must some day be rendered to One
watchful of His creatures and their deeds. Deep below the Russian
earth labored miners whose task it was to bring to the surface gold
and platinum, gems and malachite and lapis lazuli to fill the Palitzin
coffers. Vast reaches of field and furrow, of forest and vineyard,
were worked by erstwhile serfs of that princely house, in order to
fulfil the same purpose. Thousands of horses and cattle were tended
upon the plains by troops of herdsmen wearing the emblazoned
brassard of Basil-Vassilièvitch Palitzin—the present master of half a
province or so—and, strange to say, none were malcontents; for
their lord treated them well, and had made himself well-beloved
during the years of his stewardship. And now what of the Princess
who was to rule at his side? The question was late in coming to his
mind. Well-born, well-bred, well-educated, she assuredly was. Why
should she not be the absolute partner of his thoughts, his ideals,
his plans—and they were many? But would she be that? He passed
his hand slowly across his forehead, and relapsed into contemplation
of the miniature Muscovy gleaming beneath the moon at his feet
and islanded amid the great capital of France.

Paris with its round of gaieties, its music and laughter, and
republican irresponsibility! Paris, the paradise of strangers from all
parts of the globe; Paris, that from a thorough Anglomaniac had
changed with startling rapidity into an Americo-lunatic; Paris, who
threw wide her portals to every moneyed invader that chose to come
her way, and gave him in return the tinsel-glitter and costly
viciousness prepared for his or her reception, guarding jealously out
of sight whatever remained truly French and truly decent within her
walls, so that none could truthfully speak well of that famous
modern Babylon. Basil smiled a little bitterly as his thoughts ran on
thus. London, Berlin, New York—he knew them well—were wiser far
than Paris. They did not flaunt their evil in the face of visitors, not
they! They hid it scrupulously under the thick mantles of variegated
religions, suited to every taste and class. Human failings, frailties,
and worse than frailties, were shut in hidden places there, guarded
by solemn-faced warders who denied their very existence and
profited by their remarkable vivacity. And Petersburg—once again
Basil’s mind flew back to his own dear capital city, where failings and
virtues run neck to neck, and elbow to elbow, in supreme
carelessness of consequences, but at any rate without either
effrontery or hypocrisy—just like Vienna, only more so!

Laurence loved Paris. It was she who had hinted, in her pretty girlish
way, at a speedy installation there, where she knew so many people
—friends of her uncle and aunt, acquaintances made during her stay
at Seton Park, Wiltshire, and Seton House, Belgravia; her summer
cruises on the Phyllis; her short sojourns with Uncle Bob and Aunt
Elizabeth at seaside or mountain resorts. Before these she ardently
desired to appear in her new Glanz und Pracht, these who had seen
her in the character of a dependent—and what a bounty that had
been! But what did Basil know about these little secret plans? What
indeed! He had found it quite natural for a young girl, full of life and
of the joy of life, to want to spend her first married winter in the city
of worldly pleasure par excellence. At that moment, however, he
began to question the wisdom of his having so readily assented to
her wishes. He felt that it might have been better for him to have
done otherwise, to have begun by making her thoroughly acquainted
with her adopted land, her adopted nationality, her new hereditary
dignities and duties. Yes, the welfare of his own people was dear
indeed to him, and a flying trip to his chief estate, where she had
been greeted and fêted like a young queen, served but little to
initiate her to what his life among them, as their suzerain, had really
been.

With a puzzled frown he leaned his head against the cold glass. “We
belong,” he mused, “to utterly discrepant generations. I am so
irredeemably slow and old-fashioned; she is so intensely modern!”
He gave his shoulders a shake of dissatisfaction at these
shortcomings of his. Then he began to pace moodily back and forth
before the huge fireplace. “Oh yes,” he reflected, sadly, “I suppose I
will always be saying and doing things she will instinctively dislike
and resent, and if she really is of a jealous disposition—” He
stopped, pulled fiercely at his mustache, and resumed his pacings
and his futile cogitations until his brain grew tired.

Truly this night’s unfortunate events had suddenly disclosed to him


an altogether undreamed-of horizon line, and it was difficult to see
what lay concealed beyond it. Assuredly Laurence, had she but
known it, would have done better to put her hand in the fire, than to
shake even by the lightest possible touch the splendid monument of
love and trust Basil had built up for her with so great a joy and so
great a faith.
Weary, both morally and physically, he at last went back and gazed
out into the garden again. Strangely enough, the image of the
“Gamin,” in her diaphanous white dress, with her sparkling blond
hair aureoling her little head, suddenly appeared before him with
startling reality. Her blue eyes seemed to gaze deep into his, and
somehow she was no longer the playmate of other days, the merry
child who had run and danced with the wind along the terrace at
Plenhöel, who had struggled with the window-fastenings, and
climbed to the box of the drag bringing Laurence that fateful
morning, but a being wholly different; a sorrowing woman
developed to her uttermost possibilities in a few hours, a woman
possessed of the wisdom of all the ages, a friend in all the potency
of the word—a counselor—more, even more than that—some one to
look up to and gain endurance and patience from. Involuntarily he
drew closer to frosted pane, and, looking out upon the softly
gleaming moonshine by which he had symbolized her that evening,
it seemed to him that her spirit was dowering the night with all its
enshrined loveliness and shrouded mystery. Well! There would never
again be the same ease and comradeship between them as before
Laurence had committed the folly of naming her as a rival; but did
this foolish act break the sweetness of the past, or perchance lend a
new enchantment to the power of a personality Basil had not been
clearly conscious of until this moment? He drew away from the
window, determined to cut short such a train of thought now and for
all time. He must be thoroughly out of sorts himself, he argued, and
Laurence had been silly to speak as she had done—not quite as
distinguished in manner as he had fancied her to be! The women of
his class, of course, were perfectly capable of fierce jealousies, yet
they were bred and born to keep such feelings to themselves. It was
part of their métier as great ladies. Still, his wife was now one of
them; she would be taught by example the unspoken etiquette of
their decorous world. Besides, he was not the sort to give her cause
for jealousy; also he would, as far as he was able, avoid meeting
Marguerite. Yes! Yes! Everything would turn out all right—and in the
morning—the morning— He glanced at his watch by the last leaping
flames of the crumbled logs—surely it must have stopped—or else
hurried on without rhyme or reason, for it pointed at six o’clock.
Guiltily he stole back to the window and stared at the garden below.
All was so very still there—the sapphire-and-silver winter night as yet
undisturbed—but as he bent closer he saw that ever so cold and
faint a pallor was stealthily clouding its depth, its serenity, and with a
quick, impatient sigh he sought his own room.
CHAPTER VII

The sea, the wind, the call of birds,


The leaves that whisper, brooks that run,
No song is ever void of words,
To hearts that beat as one.

Sir Robert and Lady Seton were passing through Paris on their way
to join the Phyllis in Mediterranean waters. They intended to cruise
along the African coast, putting in a few days at Algiers, a week or
so in Alexandria, and then go on to the Bosphorus, which possessed
the charm of mirroring on its gracious bosom the minaretted city
where a first cousin of “Uncle Bob” was representing his country at
the Padishah’s Court.

The middle-aged couple were for the time being at the Meurice,
occupying a suite of rooms replete with every comfort, and were at
that very minute enjoying a thoroughly English breakfast in their
sunny private dining-room. No such kickshaws for Uncle Bob as
foamy chocolate and golden-coated rolls light as muslin, but soles
fried in torment, with an accompaniment of oysters, truffles,
mussels, and a seasoning of white wine; a portentous steak,
humpbacked and juicy—as every self-respecting beefsteak should be
—an omelette rouged into the semblance of a modern beauty by its
filling of tomatoes, not to mention several other odorous trifles in
the shape of grilled sardines and deviled kidneys.

Lady Seton was already armored from head to foot in well-cut


serviceable tweeds, similar in texture and color to those which
adorned her lord’s portly form. She believed in frilly dressing-gowns
and coquettish morning coiffures no more than did Sir Robert in
over-dainty breakfasts. Solidity, in costly disguise, was what they
both preferred.

Ensconced behind the pages of the London Times, Sir Robert was
seated squarely before his well-filled plate, and while perusing the
news of two days before with the greatest interest, methodically
carried his fork to his mouth, and back again for fresh supplies. His
wife, without sparing herself a bite, was getting through a pile of
letters just arrived, leaning each one in turn against the toast-rack
as she read, while “Lady Hamilton”—a sadly obese toy spaniel, and
her mistress’s darling pet—sat gravely on a cushioned chair beside
her, gloating with all her large, moist eyes over a near-by dish of
cake.

“The Prime Minister,” Sir Robert remarked, in an aggrieved tone,


“has put his veto upon the interference of Great Britain in—” He
glanced round the edge of the paper, noticed his wife’s total
inattention, murmured to himself something concerning feminine
frivolity, followed by a grumbled conjecture as to whether the
Premier realized that he was a public servant, or imagined himself
the autocrat of all the Englands, and finally relapsed into ominous
silence.

Just then a servant, so prehistorically dignified as to suggest the


Stone Age, moved noiselessly from the door to Sir Robert’s elbow,
where he stood like a statue, disdainful of employing the typical
“cough-behind-the-hand” manner of disclosing his presence, until
the shadow of his admirably nourished body falling athwart the
sacred pages of the Times did this for him.

“What is it, Berkley?” Sir Robert asked, testily; he abhorred being


disturbed at breakfast. “Has anything gone wrong?”

“No, Sir Robert—that is, yes, in a way, Sir Robert; there is a—er—
gentleman to see you, Sir Robert, in the reception-room.”
“A gentleman to see me in the reception-room at eleven o’clock!” Sir
Robert exclaimed. “Did he send up a card?”

“No, Sir Robert, leastways not that I know of. The chassewer down-
stairs”—Berkley was no French scholar—“sent up the name only, by
the page.”

“Well—confound it!—what is the name?”

“Mr. Preston Wynne,” Berkley stated.

“Young Wynne! God bless my soul! Why didn’t you say so at first?
Show him up immediately, Berkley. Why, you’ve seen him fifty times
at Seton Park. Show him up—of course if you don’t mind, my dear,”
he concluded, addressing his wife, who nodded consent without
discontinuing her reading.

In a moment Mr. Preston Wynne was warmly shaking hands with Sir
Robert, after which he reverently touched the extended tips of Lady
Seton’s fingers, bowed, and accepted a chair facing the one where
“Lady Hamilton” was now enjoying the audible slumber of the
corpulent.

“I hope I am not too early,” he said, beamingly. “You know I wanted


to catch you before you left the hotel for your constitutional, Sir
Robert. I remember your habits, you see!”

“Not a bit too early, my dear boy,” Sir Robert said, with unwonted
geniality. “I did not know you were in Paris, though. When did you
arrive?”

“Oh, a week ago or thereabouts. Grandma Wynne was set on being


here for Ethel’s wedding, and so I brought her over. She’s the most
indefatigable old lady in Christendom!” he concluded, with a laugh
that revealed a double row of strong white teeth as regular as if they
had been carved by machinery.
He was what Aunt Elizabeth called “a very personable youth,” was
this well-bred transatlantic, not very tall—say five foot nine—but well
built, well groomed, well dressed, and with a pair of keen, gray-
green eyes, and a sleek head of pleasingly red-brown hair. Moreover,
being the only son of a many-sided father, who had added greatly to
a vast inherited fortune by old-fashioned and unexceptionable
means, he was of some weight in the cosmopolitan world of the day,
amid which he moved at ease and with a delightful buoyancy. He
had met the Setons at Villefranche a couple of seasons earlier, and,
extraordinary to record, had found such favor in Aunt Elizabeth’s
eyes that an invitation to shoot at Seton Park had followed. It was
there that he had met and fallen in love with Laurence, to whom he
had proposed. That young lady, dazzled by his wealth, his prospects,
his father’s magnificent steam-yacht—anchored at the time in the
Solent—and perhaps attracted also by the young man’s inexhaustible
good temper and humorous aplomb, had been on the point of
accepting him. Her infatuation for Neville Moray had, however,
stayed her on the brink of a very desirable union. But she had,
nevertheless, left him sufficient hope for the future to make the
announcement of her marriage to Basil a very great surprise indeed.
In spite of this he did not seem particularly broken-hearted this
morning, as he sat in the full light of the windows smoking one of Sir
Robert’s best smuggled cigarettes. Lady Seton had retired to put on
her hat, and the two men were alone.

“Have you already seen my niece?” asked Sir Robert, who (it may as
well be admitted at once) could never face a situation of any
awkwardness without immediately feeling called upon to put both
his large, well-shaped feet through and through it.

“Yes, at a distance,” Wynne replied, blowing three successive rings of


blue smoke in front of him, and with such dexterity that they
interlocked and floated away amiably linked to one another.

“The day after my arrival I saw her driving in the Bois wrapped to
the eyes in amazing sables, and behind a pair of Orloffs that made
my mouth water, I assure you. Two nights later I glimpsed her at the
opera wearing a diadem and triple necklace of rubies and diamonds
fit for an empress. But in neither case did she appear to recognize
my humble personality.”

Sir Robert shook his head gloomily. “I am afraid,” he remarked, “that


she is having her brain turned by the adulation with which she is
surfeited. Personally, I wish she had married you instead of Prince
Palitzin, although I am bound to state that he is a fine man, and has
behaved toward her with the utmost generosity.”

Preston Wynne half rose, put his hand on his heart, and bowed with
gay appreciation of the compliment.

“I am,” he pronounced, “flattered indeed that you should have been


inclined to prefer me to one of Europe’s greatest personages. But,
frankly, I cannot understand why you ever did such a thing.”

Sir Robert smiled. He possessed, alas! no sense of humor


whatsoever, but somehow or other he liked what he termed the
quaint ways of this youthful friend.

“Laurence,” he proceeded to expound, “is a curious girl. Not English


in the least. Of course you know that we are one of those Catholic
families who have never given up the ‘Old Faith,’ but that has
nothing to do with it. Our blood is British—just so—and where that
child has fished her very peculiar characteristics from is more than I
can explain. At any rate, she was never quite one of us—as I
frequently tell her aunt—a regrettable circumstance. She might have
made you a good wife. You are a sensible chap, you see, who would
stand no nonsense, I’m sure. But Prince Basil is quite another affair.
He belongs to that class of foreign nobles whom we cannot help but
admire, insular though we may be, but who should decidedly wed
their own women; admirable creatures; trained to suit them and the
high position they occupy. Between you and me, my dear fellow, the
feminine portion of our Anglo-Saxon race is rapidly becoming too
emancipated, too free and easy, too assured of what they are
pleased to call their rights—an attitude, let me add, which will
gradually lead to the disclassing of the higher orders. It has already
begun to do so, and soon the British great lady of old will have
totally disappeared. Indeed, we have examples....”

“Mais où sont les neiges d’antan!” the American quoted to himself,


continuing to follow his host’s arguments with a profound and most
flattering solemnity of aspect.

“Examples,” Sir Robert continued, “which have shown us that blue


blood no longer counts for much; that, in short, coronets, time-
honored and valiantly won in the glorious past, can be doffed in
favor of the red cap of revolution,—sported on the tail of a cart,
whence their fair wearers shriek themselves hoarse in the unwashed
cause of Socialism.”

Mr. Wynne, still listening politely, was beginning to wonder where Sir
Robert was heading.

“Yes,” he put in, dubiously—“yes, of course you are entirely right,


but your niece is scarcely of the kind you refer to, and she will
without the possibility of a doubt grace the high estate in which she
now finds herself. She very naturally preferred becoming a Serene-
Highness to being plain Mrs. Wynne of Nowhere in particular; and
who can blame her? She was born to the purple; one can see it at a
glance.”

Sir Robert rose, walked over to the fire, planted himself on the rug,
and, with both hands under his coat-tails, surveyed the speaker.

“I’m glad to see you take it like that!” he stated, thinking within
himself of Neville Moray’s visible melancholy when he had met him
at a levee some two weeks after Laurence’s wedding. “There’s never
any use,” he resumed, “in crying over derailed love-affairs, and this
being so, I wish you’d come and dine with us here to-night. You’ll
meet the Palitzins and some Breton friends of Laurence’s, the
Marquis and Mademoiselle de Plenhöel. They are near relatives of
Prince Basil, and it was at their château in Brittany that Laurence
first met her husband.”

Wynne rose and drew on his left glove before answering. He wanted
just that infinitesimal space of time to make up his mind, and when
he had accomplished this task the trick was done.

“Thank you very much, Sir Robert. I’ll come with pleasure if you’ll let
me,” he said, smiling. “Good morning, Lady Seton. I’m off!” he
added as, turning, he found himself face to face with her fur-
wrapped figure. “Sir Robert has been good enough to invite me for
to-night, and so, as the saying is over here, ‘Au plaisir, madame, de
vous revoir.’”

He was gone, and in all the majesty of her matronly disapproval


Lady Seton bore down upon her husband.

“I am amazed at you, Robert, really amazed! What could induce you


to invite that poor young man with Laurence and Basil? I trust you
may have thought of asking Captain Moray to be here also. It would
really insure the success of the party!” she concluded, sarcastically.

Sir Robert’s Olympian brow reddened—his brow always became


Olympian the moment his wife appeared upon the scene.

“You are wholly correct,” he said, stiffly, “for that is exactly what I
have done!”

Lady Seton raised her muff toward heaven—a painted one, with a
Greek key pattern and cupids disporting themselves among roses in
merry French fashion—let the muff sink to the level of her somewhat
flat waist, and sat abruptly down on “Lady Hamilton,” who awoke
with a smothered groan of surprise and pain.

“My Heaven! What have I done?” shrieked the lady, getting on her
feet again with surprising agility. “Oh, my poor, poor lovey!” she
moaned, hugging the fat, wheezing little dog to her fur bosom. “Oh!
Oh! Oh!”

“Stop that nonsense, Elizabeth!” Sir Robert, more Olympian than


ever, reproved her. “You couldn’t hurt the brute if you tried. Why,
she’s like a feather pillow—most unsportsmanlike to overfeed her as
you do. And now please attend to me,” he continued, austerely,
easing with a square-toed finger the uncompromisingly angular
collar around his neck. “I asked Moray, as I told you, and now I’ve
asked Wynne to dine—that’s an accomplished fact. But what I wish
to impress upon you is that, Princess or no Princess, I don’t propose
to be made to feel like a child in my own house.” He cast a masterful
look at the topsy-turvy cupids gamboling above his head, but did not
trouble to smile at the idea of having claimed them and the attached
hostelry as his own. “If Laurence has so little tact and monde as to
be annoyed because she meets her old flames at our table, let her
be annoyed; I don’t care a fig about it. So that’s clear, is it not?”

He set his foot with an air of extreme finality upon the hearth-rug,
volte-faced, and strode to the door to meet his hat, coat, and cane
in the hands of the rigid Berkley; leaving his wife, in one of her most
acid moods, to follow behind.

The dinner-table that night was set with all the luxury that money
can suggest to French taste, and it was difficult to realize that the
silver and crystal, the porcelain and flowers, had not been
preordained and arranged by the especial orders of a distinguished
hostess. As Sir Robert said, condescendingly, “They manage these
things very well in Paris.” Contrary to what Lady Seton had
anticipated, a cheerful merriment held the guests from the moment
they sat down, and soon the conversation—never failing in genial
humor—actually rose to the higher level of wit. This was due chiefly
to Basil and to young Wynne, who seemed—much to Laurence’s
annoyance and surprise—to hit it off from the first. Lady Seton,
usually what her husband described as a “damper,” became as
nearly responsive to the pleasing atmosphere of the occasion as was
possible for her to be, while Sir Robert, to everybody’s astonishment,
plunged headlong—after the fish—into excellent yachting anecdotes.
Tubbed and razored, and shedding cheerful waves of bay-rum and
hair tonic about him, his ample shirt-front embellished by two large
pearls gleaming like moons through mist, he expanded more and
more as the well-conceived menu fulfilled its alluring promises, and
cast glances of roseate satisfaction around the board. “Elizabeth is a
fool!” he commented, inwardly. “They’re all enjoying themselves like
periwinkles at high tide.... By the way, she’s got herself up to his
Majesty’s taste, has Elizabeth. She’s positively scratched five years
off her age.” And so she had. For on occasions of ceremony, in spite
of her Galliphobe tendencies, Lady Seton knew not only how to buy,
but how to wear a Parisian gown of the best Place Vendome make,
besides which her neck and arms were still more than presentable,
and her jewels magnificent. Had there possibly lurked in her mind a
desire to eclipse Laurence’s bridal splendors? But who is to gauge
the possibilities of a feminine brain, old or young? At any rate, to
quote Sir Robert, as far as “get up” went, she was easily ahead of
her niece by several lengths; for the faint pink of the bride’s crêpe-
de-Chine, looped up with natural Bengal roses, was of Basil’s
selection, and therefore its exquisite simplicity paled before her
aunt’s gold-laminated brocades and zibline-bordered train.

Marguerite—who never cared much for what she wore—was, as


usual, in white, something soft and clinging, with an almost
imperceptible current of pearl and silver embroidery frosting its
graceful folds; on the left shoulder a cluster of her namesake
flowers, fastened by an antique silver Breton heart-and-crown, and
about her throat on a slender silver thread a silver fleur-de-lys.

So “young girlish”—si délicieusement jeune fille! Basil had thought,


as he had glanced furtively at her on her arrival. Now he did not
dare to let his eyes wander in her direction, remembering the scene
with Laurence only too well. Marguerite was placed diagonally
opposite to him—the place of honor was occupied by the British
Ambassadress, a handsome woman of fifty or so, whose blond
bandeaux retained the silky brilliance that had caused her for many
years to be known to her friends by the charming nickname of “Rose
d’or,”—and above the yellow and lilac orchids of the surtout he
trusted himself only to watch the “Gamin’s” strong little hands,
playing with her knife and fork as though she were attending a
schoolroom dinette instead of one of her first formal dinner-parties.

Beside her sat Neville Moray, a trifle too silent and contemplative,
but still smiling amiably, and Preston Wynne, from his place by the
Ambassadress, caught and passed the ball of gay chatter with Basil
and “Antinoüs,” his next neighbor. Both were highly amused by his
sallies as he related to them a recent trip to Sonora, where the elder
Wynne owned a beautiful hacienda. Mexican haut-faits were related
in vividly picturesque language, dotted now and again with Spanish
names and expletives of a gracious canority, while when the narrator
dropped into plain United States his discourse became variegated
with cowboy vernacular that brought tears of laughter to all eyes.

“We’re a queer lot, aren’t we?” Wynne was saying. “A regular


hodgepodge, believe me! You’ve got to sift the sheep from the goats
if you want to have a good time, though I am bound to say that the
sheep are not, by a long shot, the most amusing of the two—except
when they are mountain-sheep with a lot of kick in them! As to the
Dons, they are not half bad, keen as mustard, plucky as they make
’em, and with no genuine harm in them if one knows how to handle
the breed. Give me a revoluting Mexican first, next, and always, in
preference to some of our hand-raised products, made in Germany,
for instance.”

“You have a lot of Germans out there, haven’t you? So have we in


Russia, alas!” Basil interposed with a wry smile.

“Yes, Germans are Germans,” Wynne replied. “We don’t cotton to


’em much, but when fresh off the farm they are all right enough in
their way. It’s the Germo-American I object to. He who is either born
in America, or imported at little cost and so tender an age that he
mistakes himself for one of us. We have specimens worth the price
of admission, just for the privilege of ogling them. There’s one
peacherino I especially admire—a big bug, too, you bet! He came
over when he was a little shaver, and began his industrial career as a
sausage-peddler out West. He knew a thing or two, though, and
little by little he came to own a butcher shop, then two, then three—
like the boy who started in by selling sand to grocers to put in the
sugar—and ended in a lake-shore palace and the smartest set. Well,
this ambitious butcher I’m speaking of finally went into the cattle
business—wholesale, on the hoof, and all that, you know—until,
having made a pile as high as Chimborazo, he housed his family in
marble halls and let madame and her young uns have their fling.
Nothing was too good for them—an art-gallery filled with
masterpieces, a music-room where the most expensive musicanders
were heard. Plush liveries placarded with fine gold for the servants—
we don’t say help any more, even out West; we’ve found out the
fallacy of it—motor-cars from France, a steam-yacht on the lake—
they refuse themselves nothing, and their only shame is that old
German father of the whole shooting-match, who has not risen with
his fortunes! He is a holy show, it’s a fact, slouching about in an
aged overcoat and a shabby soft hat, up at five every morning and
sneaking out of his castle to do what? Bet you’d never guess! Why,
just as a matter of habit to go to the stock-yards and with his own
hands slaughter a hog. It has become second nature to him, and he
swears it gives him an appetite for breakfast.”

Sir Robert, who had been neglecting his charming neighbors, burst
into a roar of laughter.

“To kill a hog! To kill a ...” he choked, crimson with appreciation.


“Marble halls, hogs—help!” he gurgled on. “You are a queer chap,
Wynne! I like you!”

“So do I, Sir Robert,” was the prompt reply. “I was afraid my little
story might have shocked everybody.”

You might also like