CLR Via C Applied Microsoft Net Framework 2 0 Programming 2nd ed. Edition Jeffrey Richter download
CLR Via C Applied Microsoft Net Framework 2 0 Programming 2nd ed. Edition Jeffrey Richter download
https://ebookname.com/product/clr-via-c-applied-microsoft-net-
framework-2-0-programming-2nd-ed-edition-jeffrey-richter/
https://ebookname.com/product/microsoft-windows-
powershell-2-0-programming-for-the-absolute-beginner-2nd-ed-
edition-jerry-lee-ford/
https://ebookname.com/product/programming-in-objective-c-2-0-2nd-
edition-stephen-g-kochan/
https://ebookname.com/product/pro-dynamic-net-4-0-applications-
data-driven-programming-for-the-net-framework-1st-edition-carl-
ganz-jr/
https://ebookname.com/product/god-is-watching-you-how-the-fear-
of-god-makes-us-human-1st-edition-dominic-johnson/
American Textbook Reading Social studies4 2013th
Edition Ellen Guerrero
https://ebookname.com/product/american-textbook-reading-social-
studies4-2013th-edition-ellen-guerrero/
https://ebookname.com/product/clinical-guide-to-obsessive-
compulsive-and-related-disorders-1st-edition-jon-e-grant/
https://ebookname.com/product/browse-s-introduction-to-the-
symptoms-signs-of-surgical-disease-4th-edition-norman-l-browse/
https://ebookname.com/product/a-contribution-to-the-critique-of-
contemporary-capitalism-theoretical-and-international-
perspectives-global-political-studies-das/
https://ebookname.com/product/adorno-in-america-1st-edition-
david-jenemann/
The Integrated Nervous System A Systematic Diagnostic
Approach 1 Har/Cdr Edition Walter Hendelman M.D.
https://ebookname.com/product/the-integrated-nervous-system-a-
systematic-diagnostic-approach-1-har-cdr-edition-walter-
hendelman-m-d/
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
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)
123456789 QWT 8 7 6
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
vii
viii Contents at a Glance
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
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
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
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
Index 649
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
'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 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.
• 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:
Through the hot brown streets of Nineveh a merchant of Phoenicia
hawked his wares. His frame, once huge and splendid in its strength,
was bent with seeming age, and a grey beard fell to the belt of his
trailing robe. Before him, by a leathern strap about his neck, hung a
wooden tray whereon his trinkets were displayed, baubles of
polished metal, beads of coral and of carven wood, rings, amulets,
and fragrant scents. Here, too, were bracelets, chains of many links,
scarfs of web-like fabrics and of gaudy hue, colored with the secret
dyes from the Sea of the Setting Sun.
From street to street the merchant pushed his way, while ever
and anon he raised his voice in a strange shrill cry which drew
attention to himself and to his wares; and thus he bartered among
the foolish wives of Nineveh. Yet at last he wandered past the
market-place to the richer quarters of the city, and came to the
central mound whereon sat the palace of the King. To the westward
terraced slopes ran down to the level of the streets and to smooth,
wide avenues which stretched to the river gate; yet here, where the
merchant walked, the walls of the mound rose twenty cubits,
masking the royal gardens which drowsed in the noon-day heat.
Again and yet again from the old man's throat came his strange,
harsh call, resembling the cry of a startled crane in flight; then,
presently, he paused at the joyous barking of a dog and a woman's
voice in sharp admonishment: "Peace, Habal, peace!"
The merchant hurried onward, yet at the entrance of a narrow
lane he turned, cried out once more and disappeared, while within
the gardens Semiramis hid a smile and sought to soothe the whining
of a shepherd's dog.
When noontide came again, the merchant once more wandered
past the garden walls, and now a captain of the guard came out to
him.
"Hey, old man!" the soldier called. "Come, follow me, for the
Princess Sozana would look upon your wares."
"Nay," said the merchant, smiling as he shook his head, "my
trinkets deck the charms of common maidens in the market-place.
The daughter of a king would scorn them, for their price is small."
So spoke the merchant, and smiled once more as he turned
upon his heel, but the captain caught him roughly by the robe and
whispered into his ear:
"Fool! The Princess Sozana asks but once to look upon a
merchant's tray. Come quickly, lest I urge your pace by a spear-point
in your hams."
The old man trembled at the threat, and followed meekly,
through a door of bronze which pierced the wall. At the head of a
narrow flight of steps he reached the gardens which King Ninus
made for the pleasure of his idle hours. There were palms and vines
from Syria, flowers from an hundred lands, trees and shrubs which
were strange to the merchant's eyes, and fragrant thickets interlaced
by tiny paths. Here a fountain bubbled, and there an artificial spring
gushed forth as though by nature moistening the earth, while
countless birds of brilliant plumage fluttered down to drink.
Of a sudden the merchant and his guide came face to face with
those who had sent the summons. Beneath an arbor on a bench of
stone sat the Princess Sozana in a green simar which was wrought
with precious gems and with threads of gold. At her side lazed
Semiramis, robed in white; yet, unadorned, her beauty far outshone
the daughter of the King. At Sozana's feet lay Prince Memetis, the
Egyptian hostage, toying with her veil which was cast aside, and
behind them stood an Afgan mute who waved a monster fan of
plumes. None else was near, save Kishra, chief eunuch of the palace-
guard whom Ninus had left in charge of his household and his
prisoners, and who now in watchful silence sat apart, his sharp eyes
resting on the merchant's face.
The old man knelt, bent forward till his forehead touched the
earth, and sprinkled dust upon his head; then, kneeling still, he
displayed his wares to the women's listless gaze. One by one he
raised them from his tray, expounding their virtues or the potency of
sacred amulets; yet none were pleasing to Sozana's mind.
"See," she pouted, plucking at the sleeve of Semiramis, "there is
naught save jingling rubbish such as slaves may wear. Wherefore
shouldst thou bring this merchant from the streets to weary me? Ho,
Kishra! Bid the man begone."
The eunuch strode forward, but Semiramis stayed him with a
lifted hand.
"Nay," she pleaded, "I did but think to ease the dullness of the
hour, and the baubles please me, for many of the like have I seen in
Syria."
The merchant raised his head, a light of hope within his eyes;
then he fumbled in a hidden corner of his tray, producing a tiny fish
which was carven in malachite and suspended by a leathern stong.
"Ah!" cried Semiramis, and clapped her hands. "Look, Sozana!
'Tis a symbol of Dagon which the Syrian shepherds wear about their
necks when they roam the hills by night. Buy it for me, Kishra, for
'twill keep off evil, bringing peace to me and to those who serve."
The eunuch scowled, but did her bidding, while Semiramis
turned once more to the trinket tray.
"Dost know the land of Syria, old man?"
"Aye, lady," the merchant answered with sparkling eyes, "from
the slopes of Lebanon to the Sea of Death—from Jordan where
dwells the Sons of Israel to Azapah and the valley of Ascalon—"
"Sweet Ishtar!" cried Semiramis, flinging up her hands. "My
home, Sozana! He hath journeyed even to my home in Ascalon!"
She laughed and turned to the merchant once again, for now in
truth she knew that Huzim hid beneath the Phoenician's robe.
"Speak," she commanded, in the Syrian tongue which was strange to
Kishra and her friends, "speak, for they may not understand. What
message from my lord?"
So Huzim answered her and told of the danger-snares which
beset his master round about. He told of the battle in the pass, of
the wrath of Ninus, and of how the King made proclamation of the
prize to him who should first stand conqueror on the citadel of
Zariaspa. He spoke of all which Menon had commanded him, and
though his words were heavy with the weight of fear, yet Semiramis
nodded in seeming happiness and clapped her hands.
"What telleth he?" Sozana asked, and Semiramis answered with
a joyous smile:
"He telleth of my lake which sparkleth like unto a jewel among
the hills; of my fishes that swim therein, and of Dagon's little temple
on the shore. I see the sheep that browse by day, till the sun is low
behind the desert's rim, and one by one the shepherds' fires leap,
twinkling, through the dusk. Ah, Sozana, mine, 'tis like unto the joy
of Prince Memetis when he dreameth by night of his silver Nile and
the mighty pyramids."
Sozana, turning, cast a look of tenderness on him who smiled
into her eyes, and suffered her hand to linger when the Egyptian
raised it to his lips.
"Say on," begged Semiramis of the merchant once again, "for I
tell you, friend, when first I heard your hunter's call in the streets
below, my heart was set a-leaping, even as Habal loosed his tongue
in honest joy. Poor Habal! I have shut him in my chamber, lest in his
gladness he spring upon your breast and thereby undeceive this
eunuch Kishra, who even now regardeth you with a doubting eye.
Be, therefore, brief. What more of my troubled lord?"
"Mistress," replied the faithful Indian, "he urgeth that we steal
away from Nineveh by craft and journey to the land of Prince
Boabdul, whither the master followeth when my messenger shall
bear him word that all is well."
"So be it," said Semiramis, puckering her brows. "Kishra, bear a
draught of wine to this aged man who is athirst and would now
depart."
The chief of eunuchs departed on her errand, and in his
absence Semiramis spoke quickly, albeit she smiled the while:
"Go, Huzim, and sell your wares through Nineveh by day, yet
wait by night on the further river-bank where the water lilies grow. If
seven nights pass by and I come not to the place, then walk once
more by the garden wall, and Sozana shall summon you again. Buy
baubles of Egypt, Huzim, for her lover is of that land, and trifles will
seem of value in her sight; yet if Ishtar smileth I will win to the river-
bank and journey to Arabia as my lord hath willed."
When Kishra returned with a cup of wine, the Princess listened
eagerly to the merchant's tale of a ring he had seen and would seek
to find. It was fashioned, he said, of yellow metal in the form of two
serpents intertwined. It was set with moon-stones, jewels sacred to
the goddess Isis who shed her light on the land of Pharaohs far
beyond the sea; and Sozana laughed in happiness, urging that he
buy this ring though it brought the price of an hundred slaves. The
merchant promised as he drank his wine, then, once more bowing
till his forehead touched the earth, he departed whence he came. In
the streets below he smiled as he hawked his wares, while those in
the garden heard his voice uplifted ever and anon in the cry of a
startled crane.
Three days passed by, and Semiramis whipped her brain for
means of escape from Nineveh; yet all in vain, for liberty seemed as
far denied as though her limbs were weighted down by chains. On
the parapets of the garden wall paced sentinels from dawn till dawn
was come again, so that none might pass unchallenged or
unscathed. The palace was but a prison perched on its lofty mound,
and though its halls still swarmed with servants and with slaves, its
portals were sealed while the King made war on Bactria. By night
Semiramis shared the chamber of Sozana, yet the door she might
not pass, for across its threshold the eunuch Kishra lay, the curtain-
rope made fast to a copper bracelet on his waist. If by chance she
could cross the watch-dog's form to the gardens beyond and
clamber down the brick-built mound, she still must face the barrier
of the city wall or the brazen gates closed fast in the hours of night.
True, bribery of the sentinels might buy a path to the river-bank,
whence swimming the Tigris would be as play to the daughter of
Derketo; yet, one false step—one virtuous fool who scorned to
barter honesty for coin—and Huzim might wait among the lily beds
in vain.
Full many a wakeful hour Semiramis stared through the opening
in the roof, with eyes which followed not the shimmering stars, nor
the chariot of Ishtar rolling down the sky. To her troubled brain came
a thousand daring plans, each smiling hope, each ending in a jeer of
mockery, till her head grew hot, and anger rose to devour her in its
might. What! Was she, the child of gods, to be balked at every turn,
when love cried out and Menon battled with his fate alone? Nay, by
the breath of Gibil, this thing was not to be! Gold she had none
wherewith to buy release, nor jewels to tempt a captor's lust for
wealth; and yet— Of a sudden Semiramis laughed aloud, till the fair
Sozana stirred, awaking with a cry.
"Nay, child, 'tis naught," the Syrian whispered, as she stroked a
trembling hand. "Hush, sweet; I did but dream, and the spirits of the
night have brought me words of wisdom and of peace."
* * * * *
The eunuch Kishra sat beneath a palm, his mind a prey unto vexious
thought. He was hideous to look upon, with a bloated paunch, a
thick-lipped mouth, and crafty eyes which peeped from their pouch-
like rims. Long had he served in the household of the King, and now
was chief of the palace-guard and warden of the chambers where
the women dwelt. When Ninus marched to Bactria, the rearward
wing of the palace had been sealed, and, together with the gardens,
was set apart for Sozana and Semiramis, while Memetis, the
Egyptian hostage, was confined in a distant court, in charge of an
under-chief. Now the Princess had pined for the presence of him she
loved, and sought by bribery to have him brought to her; yet Kishra
feared the wrath of Ninus, and naught would move him. Sozana
then contrived, through her tire-maid Nissa, to bribe the guard who
paced before the Egyptian's door, and in secret this maiden bore
many a tender message to and fro, till she came at last to a grievous
end.
Kishra once marked her stealing from a shadowy passage-way,
and on the morrow he lay in wait, following upon her heels and
listening while Memetis whispered with the maid. In the knowledge
of being thus befooled, so great was his rage that he fell upon Nissa
and slew him with his sword, too late repenting the folly of his deed.
With the Princess he sought to excuse himself, but for once Sozana
forgot her gentle mien and rose in wrath.
"Dog!" she cried, "your life shall pay for the murder of this child,
for I swear by Asshur to see you crucified upon the garden wall."
Now the eunuch knew that Ninus loved his daughter utterly, and
at her pleading, would surely nail him to the mortar between the
bricks; so he groveled at her feet with tears and prayers, beseeching
that she speak no word on the King's return; yet the Princess
spurned him with her foot and refused to heed, till Semiramis spoke
softly into her ear, then the maiden's cheeks grew red again with a
rosy flush.
"Kishra," she answered, "I will spare your worthless life, yet
exact a price therefor. Memetis shall come each morning to the
garden here, and, beneath your sight, remain till the evening hour.
Do this, and silence holds my tongue. Refuse, and the god of
darkness claims you for his own."
Thus it came to pass that the eunuch, in his dread of being
crucified, suffered Sozana to have her will, albeit, at very sight of the
Egyptian, his blood became as water in his veins. If Ninus learned
that Memetis came each day to the women's dwelling-place, short
shift would the chief of guards receive, and Ninus was prone to
beset the passing of a man with pain. Thus Kishra roasted betwixt
two fires of woe, and because of all these things he pondered much
upon his lot, and his sleep was fraught with evil dreams.
As he now sat pondering beneath the palm, Semiramis and
Sozana talked with Prince Memetis on a distant garden-seat. This
oft' occurred, yet now there was somewhat in their manner which
annoyed the eunuch's thoughts, for they whispered, with their heads
held close together, while ever and anon they glanced to where
Kishra sat, and laughed as at some merry jest. So the eunuch waxed
suspicious of their murmurings; yet, when he came toward them,
they straightway ceased to smile and began to speak of the garden
birds, the flowering plants, or the heat of the mid-day sun.
Throughout the day they counseled among themselves in secret,
with fingers upon their lips and many a swift, mysterious sign, till
Kishra sweated because of curiosity.
All night he cudgeled at his brain for means by which to
overhear their words, and ere the dawn he bethought him of a plan.
Behind the garden-seat, whereon the conspirators were wont to loll,
was a muddy fish pond surrounded by overhanging shrubs; and here
the eunuch submerged himself, with his chin upon the bank, his fat
head covered by a mass of matted vines. In this retreat he waited
for a weary space, yet the plotters came at last, seating themselves
a spear's length from the listener's open ears.
"Hast found a messenger?" Sozana asked, in a voice subdued.
"S-h-h-h! Have a care," the Syrian cautioned, with a finger
against her lip; "the fox is listening, perchance. Keep watch,
Memetis, lest he steal upon us suddenly."
Kishra grinned from his covert in the pond, but gave no sign;
then Semiramis drew from her bosom the little fish of malachite
which was bought from the merchant of Phoenicia.
"Of a truth," said she, "the messenger hath been found, and
under Kishra's very nose. Two nights he waiteth in the street below,
till I give him warning by a night-bird's cry and cast this trinket from
the garden wall. See! I have marked it with a secret sign, for proof
to my lord in Bactria that the runner speaketh truth."
"Ah!" sighed Sozana. "And, seeing it, he will come to thee?"
"Aye," returned Semiramis, with a smile of joy, "as fast as
Scimitar can bear him on his way. Upon his coming, then will I
escape from Nineveh, and with my dear lord cross the Tigris, where
we dig our buried treasure from the earth, and—"
"Treasure!" cried Memetis. "Nay, of this thou has spoken naught
before."
"Hush!" begged Semiramis, clutching at his arm. "Methought I
marked a movement in the shrubbery. Go see, Memetis, for Kishra
would give an eye to learn of what I tell."
The Egyptian rose and beat about the undergrowth, but found
no sign of him who watched, for the eunuch lay as a dead man in
the pond, scarce breathing, though his heart was pounding in his
breast. A treasure! This, then, was why the plotters whispered
secretly. Fools! The fox's teeth, perchance, might sink beneath the
feathers when he snapped.
"'Tis naught," the Egyptian made report, as he came once more
to the garden-seat. "Say on, Shammuramat, for none can overhear."
"Mayhap," the Syrian laughed, "it were wiser that I held my
tongue, yet ye who love me will ever be discreet. When we
journeyed from Azapah to the court of Ninus, I bore a store of
jewels in a leathern sack; and, knowing not if the King would smile
or frown, I buried it on the river's further bank against a time of
need. Ah, Sozana, thou who loveth gems, shouldst look upon this
store! There are pearls from India, rubies from beyond the Sea of
the Setting Sun, blue girasols and the opals of the Nile, zircons
gleaming as the eyes of Bêlit shine, amethysts, and corals carven in
the forms of birds and beasts. Tyre, Sidon, and the far off Heliopolis
have helped to heap this hoard. With half a kingdom might be
bought, yet now it lyeth hidden in a bed of river mud."
The Princess sighed, and Semiramis pinched her dusky cheek,
promising to keep the choicest gem of all as a wedding gift for the
little daughter of Assyria.
"Nay," Sozana smiled, "'tis not for the gems I sigh, but because
of a loved one who would depart from me. Why, sweet, wouldst
thou do this thing?"
Semiramis looked thoughtfully upon the earth and stirred a
lizard with her sandaled foot.
"Dost remember the merchant of Phoenicia who was here three
days agone? He told me of my home in Ascalon. Since then I yearn
for the smell of my dew-moist hills, for the reach of the valleys, and
my sweet, cool lake which sparkleth in its bed of rocks. The water,
Sozana!—and here I look upon a tepid spring—a fountain fed by
cisterns on the palace roof. Downward this water floweth, to trickle
weakly from the earth, while eunuchs gather it in skins and bear it
back upon the roof again. Dear Ishtar, what a flout to Nature's
pride!"
For a space the three sat silent, then the Egyptian hostage
asked:
"And if thou wouldst fly with Menon unto Ascalon, what then
would chance to Kishra when the master cometh from his wars?"
Semiramis laughed softly.
"Poor Kishra! In truth he sleepeth on the hornéd cap of Bel. The
master knoweth much concerning his servant's treachery, and hath
sworn to hang him from the highest tower in Nineveh."
There were ripples in the fish pond, but the plotters gave no
heed.
"It cometh to me," Semiramis laughed again, "that this eunuch
will gather up such treasure-store as may be wrung from those who
serve him, and fly to some distant land ere Ninus nail him to the city
gate. A villain is he, yet none may say that Kishra be a fool."
For a space they argued strategems of escape from the palace
walls, and of the journey unto Ascalon, then the three arose, and,
chattering, wandered down the garden path.
From the fish pond Kishra crawled, with an evil grin upon his
face, and made his way by stealth along the wall, a stream of muddy
water dripping from his muddy robe.
From a vine-clad arbor by the fountain's pool, Semiramis
watched him creeping through the trees, and smiled.
"Of a truth," she murmured, happily, "the poison in his blood
will work; aye, even as a raisin in a skin of vinegar."
CHAPTER XIX
THE STRATAGEM
* * * * *
The Princess slept. Semiramis arose and moved in stealth toward the
door; yet she paused on the threshold, for her dog came creeping at
her heels.
"Down, Habal, down!" she whispered, struggling with her tears,
and the dog obeyed, though he whined because of impending evil—
a sense which is keen in the hearts of beasts, and is passing
strange.
In the garden all was still. Semiramis crept to the appointed
place where the eunuch waited, eager to begone. She smeared her
hands and face with pigment, donned a slave's simar, and hid her
flame-hued hair beneath a ragged hood; yet, when all was ready,
she hung back, trembling, till Kishra's patience broke, and he longed
to urge her on by blows.
The door of bronze, which pierced the garden wall, was opened
by a sentry who saw but the eunuch and a kitchen wench with a
basket upon her head. Oft had he seen the like before when Kishra
went forth in search of dainties for his pampered appetite; so when
the door clanged sharply at their backs, the sentry once more
nodded at his post.
As the street was reached Semiramis well-nigh swooned for joy,
and vowed a gift to Ishtar should the city gates be passed. In silence
they began to walk, when of a sudden each started at the sound as
of a body falling from the palace mound. They paused, but naught
was heard or seen, so the two set out again.
Westward their course was laid, past many a booth where
women laughed, and crafty hucksters lured them on to buy; past a
teeming market-place, for Kishra went boldly in accustomed paths,
lest marauders spring upon him from some darkened alley-way. The
place was a place of noises, lights and evil smells, of leering,
besotted crowds who knew the eunuch and gibed him because of
the woman at his side. The Syrian's blood burned hotly in her veins,
till she yearned to tear the jesters with her nails; yet wisdom
whispered, so she laughed in the manner of an easy-virtued kitchen
wench, and went her way.
And now the booths were passed, and they came at length to
the city wall with its mighty gates of brass. Here fortune once more
favored them, for a band of belated horsemen came clattering in,
the riders nodding on their weary steeds; so Kishra whispered with
the captain of the gate, slyly pressing a coin into his palm; then, as
the keeper turned his back, the two slipped by and went unnoticed
out of Nineveh.
In silence the treasure-seekers crossed the plain till they came
to the river bank. Here a boat was found in charge of an under-
keeper's boy who stretched out his hand for pay, then straightway
disappeared. Kishra produced a digging tool from beneath his cloak,
laid it beside him on the beach, and began to unloose the boat; and
while he was thus employed, Semiramis cast a lingering glance at
the city wall that loomed against the sky, so black, so stern, with its
monster towers which seemed to stand on guard like giant wardens
of the night.
As she gazed, her heart grew sad again—sad for the little
Princess dreaming on her couch, and because of Habal, watching for
the mistress who would come not back to him.
She sighed and turned; yet, turning, felt a cold nose thrust into
her hand; then with a cry of joy Semiramis fell upon her knees, her
arms clasped tight about the neck of the faithful dog. She
remembered the sound of a body falling from the palace mound;
'twas Habal that had leaped to the street below, where he lay for a
space with the breath dashed out of him, then hobbled along her
trail with a broken paw. At the city gate he had darted between the
legs of the horses filing in, and now crouched, panting, at the
Syrian's side, to receive caresses, or reproof because of his
disobedient love.
Now the coming of Habal proved a check to Kishra's plan of
murdering the woman when her treasure was in his hands; so,
cursing, he snatched up his digging tool wherewith to slay the beast;
but Semiramis sprang between them, furious as a mother who
defends her child, while the dog rose, snarling, eager for Kishra's
blood.
"Lay but a finger tip upon him," the mistress cried, "and you
hunt alone on the further shore! Have done! The dog is wounded,
and with us he shall go!"
Kishra paused. Full well he knew the risk of trifling with a
woman's whims. It were better to humor her in this little thing than
to hazard all ere the gems were in his clutch; so, grumbling, he cast
his digging tool into the boat and made ready to depart. The craft
was small, and rude of shape, yet would serve to bear them safely
to the other side; and when Semiramis and Habal had settled in the
bow, Kishra with his paddle pushed out into the stream.
"Whither, mistress?" he asked in a muffled tone, as though he
feared some lurker on the bank might hear.
"To the lily beds in line with the city gate," the Syrian
whispered, with a hidden smile, while she tore a strip from her
nether garment and bound it on Habal's broken paw.
For a space they were silent, and, as the boat slipped forward in
the gloom, dim voices of the night came floating to their ears—to
the woman, sweeter than a zittern's softest strain. She listened to
the river's droning hymn as it worshipped on its way to the Sea-
god's shrine, and the deep-toned song of frogs from a reedy marsh.
She heard the lisp of the paddle in the yellow tide, a heron's echoed
cry, and the far, faint call of sentries from the battlements of
Nineveh.
On the heart of Kishra these voices cast a spell of fear, chilling
the fever of his greed which till now had urged him on. Why should
the Syrian be overjoyed to greet her dog if she thought to return ere
the dawn had come? Perchance she laid some snare to trip his feet,
and would fly to Ascalon, cheating him of his wealth so coveted. The
treasure! Mayhap no gems were hidden there at all, and hers was
but a trick to lure him to his death.
A thousand terrors trickled from out the gloom; they swam
through the waters, climbed into the boat, and lay upon him heavily.
Of a sudden the traitor paused, with his paddle across his knees.
"Mistress," he asked, "what proof have I that no enemy lurketh
beside the lily beds, to fall upon me when we reach the shore?"
"None," replied Semiramis. "He who would dig for leathern
sacks, must dare such dangers as the night-gods send. Yet, if yours
be a coward's heart, turn back, for it cometh to me that a tenth is
usury." She smiled again, and bent to her restless dog: "Down,
Habal, down! What troubleth thee?"
The boat now floated in the middle of the stream, and ere
Kishra began his paddling once again, his fears were confirmed by
the actions of the dog. Habal had risen, sniffing at the air. On the
western breeze he caught a scent, and his bark rang out till the
echoes rolled from shore to shore. A friend was near at hand, and
the dog gave joyous tongue.
For a moment Kishra sat staring at Semiramis, while through his
evil brain shot the knowledge of his own credulity. From the first she
had gulled him, luring him to lie in a muddy fish pond, harkening
unto whisperings. No runner waited for her fish of malachite. Her
tremblings and her tears were but a mask. Even in her well-feigned
fury she had fed him with designs for his own undoing, and he, in
his gross cupidity, had eaten of the fruit of fools. No treasure lay
hidden on the river shore, but enemies who smiled and waited for
their own.
Mad with terror, Kishra spun the boat about, but, in his over-
strength of fear, the paddle snapped, and Semiramis laughed aloud.
Helpless he sat, a victim to this gloating witch who befooled him
with her guile—he—Kishra, warden of the King, who dared not
return again to his post of ease. Then fury took him utterly. He
seized on the digging tool, arose, and swung it high above his head
in the thought to brain her at a blow.
"Devil," he snarled, "thou hast tricked me with a lie!"
Down came the implement, but not upon the Syrian, for Habal
had leaped at Kishra's throat, and Semiramis overturned the tossing
craft.
For an instant all was darkness, fraught with fear; then the man
rose, gasping, clutching at the boat. A spear's length away he spied
a foaming swirl, where Semiramis flung high her arms and
disappeared.
Then the river again took up its droning hymn; the sentries
called from the distant battlements; a dog's head rode the waves as
it pointed to the westward shore, and a boat went spinning down
the Tigris, while Kishra clung in terror to its slippery keel.
CHAPTER XX
THE FLIGHT
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.
ebookname.com