100% found this document useful (1 vote)
16 views

Professional C 3rd ed Edition Simon Robinsoninstant download

The document provides information on downloading the third edition of 'Professional C' by Simon Robinson and other recommended ebooks from ebookultra.com. It includes links to various educational resources and details about the authors of the book. Additionally, it outlines the contents and structure of the book, covering topics related to C# programming and .NET architecture.

Uploaded by

elietdislam
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 (1 vote)
16 views

Professional C 3rd ed Edition Simon Robinsoninstant download

The document provides information on downloading the third edition of 'Professional C' by Simon Robinson and other recommended ebooks from ebookultra.com. It includes links to various educational resources and details about the authors of the book. Additionally, it outlines the contents and structure of the book, covering topics related to C# programming and .NET architecture.

Uploaded by

elietdislam
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/ 47

Visit https://ebookultra.

com to download the full version and


browse more ebooks or textbooks

Professional C 3rd ed Edition Simon Robinson

_____ Press the link below to begin your download _____

https://ebookultra.com/download/professional-c-3rd-ed-
edition-simon-robinson/

Access ebookultra.com now to download high-quality


ebooks or textbooks
Here are some recommended products for you. Click the link to
download, or explore more at ebookultra.com

Professional JavaScript for Web Developers 3rd Edition


Nicholas C. Zakas

https://ebookultra.com/download/professional-javascript-for-web-
developers-3rd-edition-nicholas-c-zakas/

The treatment of epilepsy 3rd ed Edition Simon D. Shorvon

https://ebookultra.com/download/the-treatment-of-epilepsy-3rd-ed-
edition-simon-d-shorvon/

Professional JavaScript for web developers 2nd ed Edition


Nicholas C. Zakas

https://ebookultra.com/download/professional-javascript-for-web-
developers-2nd-ed-edition-nicholas-c-zakas/

Dairy Microbiology Handbook The Microbiology of Milk and


Milk Products 3rd Edition Richard K. Robinson (Ed.)

https://ebookultra.com/download/dairy-microbiology-handbook-the-
microbiology-of-milk-and-milk-products-3rd-edition-richard-k-robinson-
ed/
Mozart 1 ed. Edition Simon P. Keefe (Ed.)

https://ebookultra.com/download/mozart-1-ed-edition-simon-p-keefe-ed/

Financial Modeling 3rd Edition Simon Benninga

https://ebookultra.com/download/financial-modeling-3rd-edition-simon-
benninga/

Timber Designers Manual 3rd ed Edition E. C. Ozelton

https://ebookultra.com/download/timber-designers-manual-3rd-ed-
edition-e-c-ozelton/

Handbook of Biodegradable Polymers 3rd Edition Bastioli C.


(Ed.)

https://ebookultra.com/download/handbook-of-biodegradable-
polymers-3rd-edition-bastioli-c-ed/

An Introduction to Ordinary Differential Equations James


C. Robinson

https://ebookultra.com/download/an-introduction-to-ordinary-
differential-equations-james-c-robinson/
Professional C 3rd ed Edition Simon Robinson Digital
Instant Download
Author(s): Simon Robinson; et al
ISBN(s): 9780764571961, 0764571966
Edition: 3rd ed
File Details: PDF, 12.41 MB
Year: 2004
Language: english
Professional C#

Third Edition

Simon Robinson
Christian Nagel
Jay Glynn
Morgan Skinner
Karli Watson
Bill Evjen
Professional C#

Third Edition
Professional C#

Third Edition

Simon Robinson
Christian Nagel
Jay Glynn
Morgan Skinner
Karli Watson
Bill Evjen
Professional C#, Third Edition
Published by
Wiley Publishing, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright © 2004 by Wiley Publishing, Inc., Indianapolis, Indiana. All rights reserved.
Published simultaneously in Canada
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by
any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted
under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission
of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clear-
ance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the
Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Cross-
point Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4447, E-mail: permcoordinator@wiley.com.

LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE


NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS
OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING
WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY
MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND
STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS
SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING
LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS
REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT.
NEITHER THE PUBLISHER NOT THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HERE-
FROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A
CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT
THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR
WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD
BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAP-
PEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.

For general information on our other products and services please contact our Customer Care Department
within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Trademarks: Wiley, the Wiley Publishing logo, Wrox, the Wrox logo, and Programmer to Programmer are
trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates. All other trademarks
are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or
vendor mentioned in this book.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not
be available in electronic books.
Library of Congress Control Number: 2004103177
ISBN: 0-7645-5759-9
Printed in the United States of America
10 9 8 7 6 5 4 3 2 1
About the Authors
Simon Robinson
Simon Robinson is the editor-in-chief of ASP Today, one of the leading sites
related to Web programming on the Windows platform.

Simon’s first experience of commercial computer programming was in the


early 1980s, when a computer project he was working on at college became
the school’s student timetabling program, running on the BBC Micro. Later
he studied for a Ph.D. in physics and subsequently spent a couple of years
working as a university physics researcher. From there he moved on to work-
ing as a computer programmer, then writing books about programming, and
finally on to his present job at ASP Today.

He has an extremely broad experience of programming on Windows. These days his core specialty is .NET
programming. He is comfortable coding in C++, C#, VB, and IL, and has skills ranging from graphics and
Windows Forms to ASP.NET to directories and data access to Windows services and the native Windows API.

Simon lives in Lancaster, UK. His outside interests include theater, dance, performing arts, and politics.
You can visit Simon’s Web site, http://www.SimonRobinson.com.

Christian Nagel
Christian Nagel is an independent software architect and developer who
offers training and consulting on how to design and develop Microsoft .NET
solutions. He looks back to more than 15 years’ experience as a developer
and software architect. Christian started his computing career with PDP 11
and VAX/VMS platforms, covering a variety of languages and platforms.
Since the year 2000—when .NET was just a technology preview—he has
been working with various .NET technologies to build distributed solutions.
With his profound knowledge of Microsoft technologies, he has also written
numerous .NET books; is certified as Microsoft Certified Trainer (MCT),
Solution Developer (MCSD), and Systems Engineer (MCSE); and is the
Microsoft Regional Director for Austria. Christian is a speaker at international conferences (TechED,
DevDays, VCDC) and is the regional manager of INETA Europe (International .NET User Group
Association) supporting .NET user groups. You can contact Christian via his Web site,
http://www.christiannagel.com.

Jay Glynn
Jay Glynn started writing software nearly 20 years ago, writing applications
for the PICK operating system using PICK basic. Since then, he has created
software using Paradox PAL and Object PAL, Delphi, VBA, Visual Basic, C,
C++, Java, and of course C#. He is currently a Project coordinator and
Architect for a large financial services company in Nashville, Tennessee,
working on software for the TabletPC platform. He can be
contacted at jlsglynn@hotmail.com.
Morgan Skinner
Morgan Skinner began his computing career at a tender age on a Sinclair
ZX80 at school, where he was underwhelmed by some code a teacher had
written and so began programming in assembly language. After getting
hooked on Z80 (which he believes is far better than those paltry 3 registers on
the 6502), he graduated through the school’s ZX81s to his own ZX Spectrum.

Since then he’s used all sorts of languages and platforms, including VAX
Macro Assembler, Pascal, Modula2, Smalltalk, X86 assembly language,
PowerBuilder, C/C++, VB, and currently C#. He’s been programming in
.NET since the PDC release in 2000, and liked it so much, he joined Microsoft in 2001. He now works in
Premier Support for Developers and spends most of his time assisting customers with C#.

You can reach Morgan at http://www.morganskinner.com.

Karli Watson
Karli Watson is a freelance author and the technical director of 3form Ltd
(http://www.3form.net). Despite starting out by studying nanoscale
physics, the lure of cold, hard cash proved too much and dragged Karli into
the world of computing. He has since written numerous books on .NET and
related technologies, SQL, mobile computing, and a novel that has yet to see
the light of day (but that doesn’t have any computers in it). Karli is also
known for his multicolored clothing, is a snowboarding enthusiast, and still
wishes he had a cat.

Bill Evjen
Bill Evjen is an active proponent of the .NET technologies and community-
based learning initiatives for .NET. He has been actively involved with .NET
since the first bits were released in 2000 and has since become president of
the St. Louis .NET User Group (http://www.stlusergroups.org). Bill is
also the founder and executive director of the International .NET ssociation
(http://www.ineta.org), which represents more than 125,000 members
worldwide. Based in St. Louis, Missouri, USA, Bill is an acclaimed author
and speaker on ASP.NET and XML Web services. He has written XML Web
Services for ASP.NET, Web Services Enhancements: Understanding the WSE for
Enterprise Applications, Visual Basic .NET Bible, and ASP.NET Professional
Secrets (all published by Wiley). Bill is a Technical Director for Reuters, the
international news and financial services company. He graduated from Western Washington University
in Bellingham, Washington, with a Russian language degree. You can reach Bill at evjen@yahoo.com.

Contributor
Allen Jones
Allen Jones has a career spanning 15 years that covers a broad range of IT disciplines, including enter-
prise management, solution and enterprise architecture, and project management. But software develop-
ment has always been Allen’s passion. Allen has architected and developed Microsoft Windows–based
solutions since 1990, including a variety of e-commerce, trading, and security systems.

Allen has co-authored four popular .NET books including the C# Programmer's Cookbook (Microsoft
Press) and Programming .NET Security (O’Reilly), and he is actively involved in the development of
courseware for Microsoft Learning covering emerging .NET technologies.
Credits
Vice President and Executive Group Publisher Editorial Manager
Richard Swadley Kathryn A. Malm

Vice President and Executive Publisher Development Editor


Bob Ipsen Sharon Nash

Vice President and Publisher Production Editor


Joseph B. Wikert Eric Newman

Executive Editorial Director Text Design & Composition


Mary Bednarek Wiley Indianapolis Composition Services

Acquisitions Editors
Sharon Cox
Katie Mohr
Contents

Introduction xxvii

Part I: The C# Language 1

Chapter 1: .NET Architecture 3


The Relationship of C# to .NET 4
The Common Language Runtime 4
Advantages of Managed Code 4
A Closer Look at Intermediate Language 7
Support for Object Orientation and Interfaces 8
Distinct Value and Reference Types 9
Strong Data Typing 9
Error Handling with Exceptions 16
Use of Attributes 17
Assemblies 17
Private Assemblies 18
Shared Assemblies 19
Reflection 19
.NET Framework Classes 19
Namespaces 21
Creating .NET Applications Using C# 21
Creating ASP.NET Applications 21
Creating Windows Forms 24
Windows Services 24
The Role of C# in the .NET Enterprise Architecture 24
Summary 26

Chapter 2: C# Basics 29
Before We Start 30
Our First C# Program 30
The Code 30
Compiling and Running the Program 31
Contents
A Closer Look 31
Variables 34
Initialization of Variables 34
Variable Scope 35
Constants 38
Predefined Data Types 39
Value Types and Reference Types 39
CTS Types 40
Predefined Value Types 41
Predefined Reference Types 44
Flow Control 47
Conditional Statements 47
Loops 51
Jump Statements 54
Enumerations 55
Arrays 57
Namespaces 58
The using Statement 59
Namespace Aliases 60
The Main() Method 61
Multiple Main() Methods 61
Passing Arguments to Main() 62
More on Compiling C# Files 63
Console I/O 65
Using Comments 67
Internal Comments Within the Source Files 67
XML Documentation 68
The C# Preprocessor Directives 70
#define and #undef 70
#if, #elif, #else, and #endif 71
#warning and #error 72
#region and #endregion 72
#line 72
C# Programming Guidelines 73
Rules for Identifiers 73
Usage Conventions 74
Summary 81

Chapter 3: Objects and Types 83


Classes and Structs 84
Class Members 85
Data Members 85
Function Members 85
x
Contents
readonly Fields 99
Structs 101
Structs Are Value Types 102
Structs and Inheritance 103
Constructors for Structs 103
The Object Class 104
System.Object Methods 104
The ToString() Method 105
Summary 107

Chapter 4: Inheritance 109


Types of Inheritance 109
Implementation Versus Interface Inheritance 109
Multiple Inheritance 110
Structs and Classes 110
Implementation Inheritance 111
Virtual Methods 112
Hiding Methods 113
Calling Base Versions of Functions 114
Abstract Classes and Functions 115
Sealed Classes and Methods 115
Constructors of Derived Classes 116
Modifiers 122
Visibility Modifiers 122
Other Modifiers 123
Interfaces 123
Defining and Implementing Interfaces 125
Derived Interfaces 128
Summary 130

Chapter 5: Operators and Casts 131


Operators 131
Operator Shortcuts 133
The Ternary Operator 134
The checked and unchecked Operators 134
The is Operator 135
The as Operator 136
The sizeof Operator 136
The typeof Operator 136

xi
Contents
Operator Precedence 137
Type Safety 137
Type Conversions 138
Boxing and Unboxing 141
Comparing Objects for Equality 142
Comparing Reference Types for Equality 142
The ReferenceEquals() Method 142
The virtual Equals() Method 143
The static Equals() Method 143
Comparison Operator (==) 143
Comparing Value Types for Equality 143
Operator Overloading 144
How Operators Work 145
Operator Overloading Example: The Vector Struct 146
Which Operators Can You Overload? 153
User-Defined Casts 154
Implementing User-Defined Casts 155
Multiple Casting 161
Summary 165

Chapter 6: Delegates and Events 167


Delegates 167
Using Delegates in C# 169
SimpleDelegate Example 172
BubbleSorter Example 174
Multicast Delegates 177
Events 179
The Receiver’s View of Events 180
Generating Events 182
Summary 186

Chapter 7: Memory Management and Pointers 187


Memory Management under the Hood 187
Value Data Types 188
Reference Data Types 190
Garbage Collection 192
Freeing Unmanaged Resources 193
Destructors 193
The IDisposable Interface 195

xii
Exploring the Variety of Random
Documents with Different Content
direction. This is illustrated by the large rotary presses in the picture
of the pressroom, one of which, the four-cylinder, has just been
removed to make way for presses adapted to finer magazine work.
There is still in the rotary press the necessity of feeding by hand. A
number of machines have been invented to feed themselves from a
roll of paper, thus introducing another rotary motion, and to "deliver"
the paper by still another rotary process. None of these presses, so
far, have come to such perfection as to print from type as well and
as fast as the great rotary press now used by the Witness, but they
are constantly improving in construction. Such presses have, of
course, to print one side of the paper and then the other before the
sheet leaves the press, and would have to deliver these perfected
sheets as fast from one exit as the rotary does from eight or ten. It
is in these points where the difficulty is found, as one side has to be
printed before the ink is dry on the other, and the rapid disposal of
the finished papers requires very ingenious machinery. There are
further improvements still in the future. We can imagine lithography
completely supplanting type or stereotype printing,—as it has begun
to do,—the impression of the type being transferred to stone, or
some other lithographic surface. If lithographic surfaces could be
made cylindrical they could, being smooth, work against each other,
and so print both sides of the paper at the same time. The whole
press would thus consist of two impression rollers and two more to
ink them going round just as fast as the chemical character of the
ink would permit. The Witness has had to purchase a new machine
about every five years to keep up with the times, and it is not
probable that it will be otherwise in the future.
HOISTING "TURTLE" ON THE PRESS.

As the sheets are printed they are gathered from each of the eight
receiving tables and carried off to the folding machines, of which
there are four on the same flat. These are unable to do all the work
as quickly as required, so that some are sent up to the bindery
above, and folded by hand.
Let us, for a moment, consider the amount of paper which goes
through the presses on this floor in a year. There are, devoted to
papers, an eight-cylinder rotary for the Daily, a two-cylinder for the
Weekly Witness, and a single-feeder for the Messenger. There are also
several presses for job work, one of which, however, prints L'Aurore,
and another the New Dominion Monthly, which need not now be
referred to in detail.

A FELLOW LABORER.

Some fourteen thousand five hundred copies of the Daily Witness are
printed daily, or 4,509,500 a year, excluding from the calculation
Sundays and legal holidays. The circulation of the Weekly Witness
averages twenty-six thousand copies, or 1,412,000 in a year. Some
fifty thousand copies of the Northern Messenger are issued semi-
monthly, or 1,200,000 sheets a year. Thus the total mounts up to
more than seven million papers which are printed on these premises
during a year. A few statistics with this number as a basis would
prove interesting. Piled in reams these papers would form a column
3,560 feet high, or more than two-thirds of a mile. Stretched out and
pasted together they would reach four thousand four hundred and
twenty-one miles. But such figures as these simply daze one, and we
will leave them and follow the papers a little farther.

The Press Room.

These take two courses. Some go upstairs to the mailing room,


while others are counted out to the newsboys for street sale and to
the dealers throughout the city. The newsboys are a most unruly lot,
and to be kept under control are compelled to wait in a room, built
on purpose for them, until the papers are ready. This time they
occupy in quarrelling, cutting their names on the sides of the deal
partitions, and calling out to "Miss Gray," the traditional name given
to every young lady who has had charge of that department for the
last ten years or more. Should a gentleman take her place for the
nonce, he is called Mr. Gray. As soon as the papers are ready they
are counted out to the newsboys, each of whom has his particular
beat or stand in the city. Some, with more enterprise or capital than
others, buy by wholesale, and sell to others with less capital. A few,
standing on the street corners, have regular customers who pay or
not, as the case may be, each night; and as the business men pass,
one after another, the papers are handed to them almost as rapidly
as tickets at a crowded concert-room. Often they are snatched from
under the boy's arm; but no matter, without any system of book-
keeping, or even a book of original entry, each customer will be told
the exact amount he owes at any time, and without a moment's
hesitation. These newsboys sell from one to twenty dozen copies
daily. They pay for the Witness eight cents a dozen, and sell them at
a cent each. Thus the newsboy's income will average from four cents
to eighty cents per day—the latter no inconsiderable sum in these
hard times.

THE NEWSBOY'S FESTIVAL.

Although unkempt looking, rough in manner, boisterous and


unmannerly in speech, there is often much that is good in the
newsboy, and Mr. Beatty, of the Witness office, keeps a sharp eye
after their character and interests. About once a year the office gives
them a dinner, or something of the sort, which they attend as one
man, or, more properly, as one boy or girl, for some of the
"newsboys" are girls. It is one of these occasions which is shown in
the picture. The boy standing with his arms full and legs crossed has
just been informed that he could "pocket," and now wants to have
his picture taken.
Much of the business once done by the newsboys has been taken
away by the fruit dealers, grocers, and confectioners throughout the
city, most of whom have regular customers to supply. To these the
papers are sent by four carts built for the purpose. They are shown
in the picture of the building, some of them in process of being
laden and others departing with their loads. During the day the
number of papers to be sent to each dealer is plainly marked on
prepared labels, on which are printed the name and address. These
are arranged in order according to the route they are to be taken. As
soon as the papers are printed, they are rapidly and securely tied up
in bundles, with the label exposed, for the carrier; and in a few
minutes after the paper is sent to the press the four carts are swiftly
carrying them to all corners of the city. Each driver has a shrill and
peculiarly sounding whistle, which is blown immediately before each
dealer's door is reached; the bundle is thrown on the sidewalk as the
horse dashes by unchecked, and the contents distributed amongst
the crowd of customers sure to be waiting for their Witness.
Again, some of the parcels have to be made up for the towns, to
which they are sent by railway, through the agency of the Express
office. Almost every town in Canada on the railway receives its
bundle of papers, and as each new railroad is opened the demand
for the Daily Witness to be sent in this manner increases. A large
number also go by mail to the remote parts of the country, and in
glancing over the mailing lists the person most conversant with the
geography of Canada would be obliged to confess that a very large
percentage of the names he would there meet was entirely
unfamiliar to him.
The manner of addressing papers adopted in the Witness office is to
print the names and addresses, with the date when the subscriptions
expire, directly on the papers themselves, in red ink. This method
has several disadvantages, but these are counterbalanced by the
fact that when once the name is printed it can never come off, as is
the case when addresses are printed on little slips of colored paper,
and then pasted on. In either method the subscribers' names are
first set up in columns, under their respective post-offices, these
offices being arranged alphabetically for facility of reference. It will
be noticed that the post-office is only printed once, and then in large
heavy type, the subscribers' names following it in the column. Five of
these columns, containing on an average two hundred names, are
placed in a "chase" and locked up. There are altogether in the office
some three hundred and fifty of these chases constantly in use.
They have to be continually revised, at which from two to ten men
are constantly engaged. When the mailing time comes the chase
which is to be used is inked and placed in the mailing machine,
which is shown in the engraving. The machine is worked by the
operator's foot. A paper is put under the hammer, as shown, and the
treadle being pressed the name in the chase beneath is plainly
stamped on the paper. Only the first paper of each parcel has the
name of the post-office as well as that of the subscriber. When all
the papers going to one post-office have been stamped, they are
tied in one parcel and that with the name of the post-office being
uppermost, the general address of the whole is known. When the
parcel arrives there it is opened, and the postmaster makes the
further distribution.
ADDRESSING MACHINE.

Those who read this account will understand how it is that


sometimes papers go astray. It would be wonderful if, out of nearly a
hundred thousand names always in type at the Witness office, while
changes are constantly being made in the lists, there were not some
mistakes, and it is creditable to the system adopted by newspaper
publishers that the number is comparatively so small.
As will have been observed, the type from which the Witness is
printed when in the turtles assumes a rounded shape. Readers of
that paper know that on many occasions it is embellished with wood
cuts, and that wood engravings are ordinarily cut on a flat surface.
They may have wondered how the difficulty is got over. In the
Witness all the engravings are electrotyped. To perform this
operation an impression of the engraving is first made in a sheet of
wax by means of a powerful press. The wax is so fine and the
pressure so great that the finest lines are reproduced. The wax is
then blackleaded with graphite, made especially fine for the purpose,
and the waxen plate is inserted in an battery in which is a strong
solution of copper. In a few hours a thin film of copper, the exact
counterpart of the engraving, is formed. This is laid on its face in a
hot iron pan and over the back a covering of tin foil is placed to give
it consistency, the heat causing it to melt and fill all the finer
interstices of the engraving. Over this again is poured a "backing" of
lead or type metal, which is shaved down to the exact thickness
required. This is again backed with wood, to raise it to the height
necessary for printing. This wood has been curved to the shape of
the press and the electrotype is bent to correspond. Some papers
stereotype the whole form—a shorter process, but one impracticable
for an afternoon paper in editions, as, in the latter case, even fifteen
minutes' delay would be more than could be spared.
Thus having disposed of the mechanical branch of printing, we will
next resort to another matter of the greatest importance to a daily
newspaper—that of advertising. The Daily Witness is sold at a cent a
number, a sum which hardly pays the cost of paper alone; so that
out of the advertisements inserted must be met the expenses for
printing, publishing, editing, etc. If an ordinary newspaper, published
in a small city such as Montreal practically was twenty years ago, be
examined, it will be found that nine-tenths of the advertisements,
measured by the space occupied, come under one of the following
categories: advertisements of liquors and tobacco, of groceries
including liquors and tobacco, or of places selling liquors;
advertisements of theatres and other questionable amusements;
advertisements of questionable medicines; advertisements of
questionable reading matter; advertisements of other quackeries. To
avoid all such was the firm determination of the Witness from the
beginning, so that it had, as it were, to create its own advertising
business. Another custom against which it set its face was that of
using large and varied type in advertisements, seeing that when all
do this they neutralize each other in point of prominence, and get
much less value out of their space,—besides making a very ugly and
vulgar looking paper. It was held that among advertisements printed
in uniform type, a small number printed prominently would be worth
a great deal to those who chose to pay for them, and more in
proportion to the fewness of them. This end was gained by charging
double to all who thought the prominence worth the price. Instead
of putting difficulties in the way of making changes in
advertisements, the Witness does its best to get the advertisers to
put in new advertisements every day, believing that were this to
become universal the advertising columns would be as much studied
as the reading columns. Here are one or two points not understood
by all advertisers: one, that it is of no advantage to draw attention
to commodities that are not worth the money they are sold for. If
purchasers are disappointed, the more attention drawn to the goods
the worse for the business,—those swindling concerns that live on
first transactions always excepted. Another thing is that it is better to
have an advertisement where it will be looked for by those wanting
the article than to have to draw the attention of everybody to it. To
get people into the habit of looking into certain quarters for certain
things should be the primary object of all advertisers and advertising
mediums. Some Montreal men are proving adepts in the art of
advertising and making it very profitable, while, on the other hand,
there is no way of throwing away money faster than by unwise
advertising.
Some idea of the amount of business which is done in advertising
may be obtained from the fact that in 1877-78, one of the dull years,
twenty-four thousand two hundred and ninety advertisements were
received in the Witness office, a daily average of seventy-nine. This
was obtained almost without any canvassing. A business that
depends largely on canvassing must necessarily adopt prices that
will cover canvassers' commission.

ANSWERING AN ADVERTISEMENT.

There are many traditions in the Witness office in regard to


remarkable answers to advertisements. A gentleman, one bright
summer's day, lost a favorite canary, and hurried to the Witness
office to make his loss known. His advertisement was immediately
sent up to the compositors' room to be set up, and while this was
being done the bird flew in through the window and perched himself
on the case immediately in front of the young man who was putting
the advertisement into type. Birdie was caught, and soon the owner
was happy again. It is well that all lost articles do not, in a similar
manner, find their way into printing offices, as the character of the
profession might then be subject to suspicion.
The subject of curious advertisements is an endless one, and has
been fully entered into in Sampson's "History of Advertising." There
is the kind in which the sentences are, to say the least, ambiguous,
as that of the lady who advertised for a husband "with a Roman
nose having strong religious tendencies." Then there was "to be sold
cheap, a splendid gray horse, calculated for a charger, or would
carry a lady with a switch tail,"—hardly as curious an individual as
the one spoken of in the following announcement: "To be sold
cheap, a mail phaeton, the property of a gentleman with a movable
head as good as new." A travelling companion to these would be the
following: "To be sold an Erard grand piano, the property of a lady,
about to travel in a walnut wood case with carved legs." But what
can compare with the specimen of humanity referred to by a chemist
in the request that "the gentleman who left his stomach for analysis
will please call and get it, together with the result!"
The insertion of marriages is of early date, they first appearing as
news, and in certain respects were much more satisfactory than
those now given, as for instance, the one in the Daily Post Boy of
February 21st, 1774:

"Married, yesterday at St. James' church, by the Right Rev. Dr.


Hen. Egerton, Lord Bishop of Hereford, the Hon. Francis
Godolphin, Esq., of Scotland Yard, to the third daughter of the
Countess of Portland, a beautiful lady of £50,000 fortune."

Sometimes the papers in those days disputed as to the matters of


marriages and deaths. The London Evening Post, in April, 1734,
said:

"Married.—A few days since—Price, a Buckinghamshire


gentleman of near £2,000 per annum, to Miss Robinson, of the
Theatre Royal, Drury-lane."
At this the Daily Advertiser remarks, a few days later, "Mr. Price's
marriage is entirely false and groundless"—a peculiar kind of
marriage that. The Daily Journal about the same time asserts:

"Died.—On Tuesday, in Tavistock-street, Mr. Mooring, an


eminent mercer, that kept Levy's warehouse, said to have died
worth £60,000."

But the Daily Post informs the public that "this was five days before
he did die, and £40,000 more than he died worth."

That the principle of protection was known in 1804 is clearly shown


by the following important advertisement:

"To be disposed of, for the benefit of the poor widow, a Blind
Man's Walk in a charitable neighborhood, the comings-in
between twenty-five and twenty-six shillings a week, with a dog
well drilled, and a staff in good repair. A handsome premium will
be expected. For further particulars inquire at No. 40, Chiswell
street."

We will conclude this branch of advertising by one of more recent


date from a United States paper, whose frankness is charming:

"About two years and a half ago we took possession of this


paper. It was then in the very act of pegging out, having neither
friends, money, nor credit. We tried to breathe into it the breath
of life; we put into it all our own money, and everybody else's
we could get hold of; but it was no go; either the people of
Keilhsburg don't appreciate our efforts, or we don't know how to
run a paper. We went into the business with confidence,
determined to run it or burst. We have busted. During our
connection with the Observer we have made some friends and
numerous enemies. The former will have our gratitude while life
lasts."

This was inserted in the space reserved for death notices, and really
deserved some obituary poetry.
During December and January the department in a newspaper office
busy above all others is the one where the subscriptions are received
and the lists attended to.

COUNTING ROOM.

The immense amount of work which comes under this head has
been previously referred to. A few statistics will render it more clear.
During the year ending February, 1877, twenty-two thousand seven
hundred and seventy-three money letters passed through this
department in the Witness office, while as many more, having
reference to changes, instructions, giving advice, etc., were attended
to. Some of these letters are of an extraordinary nature. In one
instance, on a day when some eight hundred money letters poured
into the department, the writer signed his name after the manner of
an enigma. It was interesting, but out of place. People sometimes
send letters with the statement, "Of course you know my name, as
you sent me a circular," or something similar. Others sign their
names without giving any post-office address, while many again give
two addresses, one at the head and the other at the foot of their
letters. Sometimes the amount required to be sent is enclosed with
no other intimation; but more frequently still the letters, names and
all, are sent without the money.
By an ingenious method all money letters which come into this
department are numbered, the amount received and the page of
cash book where entered marked upon them, and then filed away in
books of one hundred, which are bound together, so that any
particular letter can be turned up in an instant and referred to. The
cash book is ruled so as to give a column for the Daily Witness,
Weekly Witness, Northern Messenger, New Dominion Monthly, and
Aurore, and the total amount; and sometimes one single letter
contains a subscription for every one of the papers enumerated,
while a very large proportion have at least two of them. There are a
very large number of subscribers who, year after year, take these
papers, and not satisfied with this evidence of goodwill, make a
point of sending several other subscriptions along with their own. It
is always pleasant to the publisher to hear from these, and their
letters constantly recurring, year by year, are like the visits of old
friends.
It would be impossible to leave this department without a reference
to a minor one partially connected with it—that having charge of the
premiums. It is desired, as far as possible, to give some return for all
favors done. But here arises a difficulty. Most of these favors are
simply because of the goodwill of the performers, and any direct
return would be anything but pleasing to them. Thus the rule has
been made that those who desire to work for prizes must, in some
way, indicate their desire, and the manner considered most
satisfactory is to have the words "In competition" written on the top
of all letters containing money intended for the prizes. The names of
those who send such letters are entered in a separate book ruled in
columns, and the remittances are recorded one after the other, so
that when the last is sent in the total can be checked in an instant.
The number of prizes given in a year is nothing inconsiderable. The
following is merely a partial list of what were sent out in the winter
of 1877-78:—236 pairs of skates; 30 gold lockets; 125 gold rings; 40
photograph albums; 82 Pool's weather glass and thermometer
combined; 6 magic lanterns; 4 McKinnon pens; 298 chromos of Lady
Dufferin and 327 of the Earl of Dufferin.

GRAVERS' TOOLS

A new and growing department in the Witness office, but quite


unique as regards daily newspapers, is the one where the wood-
engravings are made. Next to the reporter, whose materials, except
those carried in the head, consist of a cedar lead-pencil, a few
sheets of paper and a penknife, his are the least troublesome and
expensive used in almost any line of business. To bring out all the
beautiful effects obtainable in wood-engraving the only tools used
are about thirty "gravers' tools," most of them triangular in shape,
ground down to a sharp point. The material used is boxwood, cut
across the log, joined in small pieces so perfectly that the place of
junction cannot be distinguished, and polished to a perfect state. On
this the design to be followed is drawn. The engraver may either be
an artist or not. If an artist, he will, as he pursues his work, alter
and improve an imperfect drawing in its minor and imperfect details,
as may be necessary; putting in a little light here, darkening a shade
there, and almost invariably turning out a pleasing picture. If not an
artist, he will "follow his copy, even if it goes out of the window," as
a compositor would say, copying beauties and defects with the same
unconcern, and producing a picture even from a good drawing with
as little spirit or soul as the block on which he works—a "wood-cut,"
not an "engraving." It will be understood that all wood-engravings
are made in relief, that which is to be printed being allowed to
remain, the lights being cut away. If this were merely all, the work
would not be very difficult; but more is required. The block must be
lowered at places to give very light and delicate shades and that the
edges of the shades may not be harsh and coarse, for the press is
not naturally a discriminating machine, and unless everything is very
near perfection, little aid can be given by it. But, nevertheless, the
pressman is required to assist the engraver, and to do this properly
he also must be an artist. By placing small pieces of tissue paper, or,
sometimes, something coarser, under the electrotype here and there
where needed, he will cause it to rise and greater pressure to come
on some portions where greater distinctness is required than at
others. This is called "underlaying." More perfect work than is
possible in newspapers is obtained by "patches," as they are called,
pasted on the "tympan," or the sheet which presses on the face of
the engraving, a process called, in contradistinction to the other,
"overlaying." There are now three engravers in the employ of the
Witness office, and by one of these, Charles Wilson, a deaf-mute, the
sketches which illustrate this article were made, with three
exceptions, which the reader will have no difficulty in determining.
Most of the pictures were engraved by him and his confrères, others
being executed by an etching process on zinc without the use of
wood at all, or, indeed, of any engraving process, which we cannot
now further refer to.
All matters in regard to the newspaper are in interest subordinate to
the editing, to which everything is in all ways subsidiary. Who or
what is the mysterious "We" whose opinions have such weight, and
who appears to be possessed of all knowledge? Sometimes there is
little mystery about it, as when the public are informed that
"yesterday we received the finest cucumbers we ever ate from Mr.
Gardner;" or when it is announced that "the public must excuse the
small quantity of editorial matter and the mistakes in our paper of
last week, as we were laid up with rheumatism." There is no poetry
about a "we" who eats cucumbers or is troubled with rheumatism.
But the candid impersonal opinions of a newspaper are usually of
great weight and value, and enhanced by the impersonality of the
writer.
That this should be the case requires no discussion. A newspaper
office is the centre of information on current topics. The news
gravitates to this centre as naturally as riches to a wealthy man.
Thus the writer should be well-informed and be the best able to give
a correct judgment on matters of general interest. Then the fact that
the argus-eyed press the country over is watching his utterances
closely has a tendency to cause much greater care in the expression
of views than is the case in ordinary conversation, or in public
addresses which will be heard and forgotten. But let a writer in a
paper which has the reputation of being impartial make a mistake of
consequence, and he has many correctors before the day is over. On
the other hand, there is a very great disadvantage under which
many papers labor. They are the "organs" of some political party,
and instead of being advocates of truth, are advocates of truth only
when it suits the "party." It is strange that such papers are often
blindly followed, although the followers generally imagine that they
are the leaders.
Suffice it to say, while on this matter, that the editor of a
metropolitan daily newspaper is an impersonal individual, or
individuals, who never can be seen. His functions, however, are
divided, and every one who visits a newspaper may find the person
he wants. The reception of visitors is one of the most engrossing
duties of the editorial chair. Almost daily they come in throngs, for
business or for pleasure—to receive advice, but more often to give it
—to compliment, but more frequently to complain—sometimes, but
proportionately seldom, to give valuable information. But the last
they do, sometimes, and all such visitors are gladly welcomed.
Usually the busiest looking man on the editorial staff in a newspaper
office is the managing editor, on a morning paper known as the
night editor. Every item which appears in the paper except the
advertisements must pass through his hands. It is his duty to see
that the copy is sent in in good form and grammatically correct. He
prepares the telegrams for publication, no inconsiderable duty,
requiring an extended knowledge, exact and varied information,
carefulness, tact and experience, to be properly done. No message,
however ambiguous when he receives it, must be ambiguous when
it leaves his hands. The contractions must be extended, the wrongly-
spelled proper names put right and verified by means of atlas,
directory or gazetteer, and on his zeal and ability in no slight
measure depends the acceptability of the newspaper to the public.
CONNECTING BRIDGE.

A man of no little consequence in most daily papers is the


commercial editor. He needs discretion, shrewdness, sound
judgment, and above all to possess the highest sense of honor and
responsibility. In these days when fortunes are made and lost in an
hour, when farmers consult the newspapers as to the time to sell,
and business is conducted at a feverish heat, it is necessary that all
important commercial transactions be promptly and correctly
reported in the daily papers. To do this properly is a matter of great
difficulty. "Bulls" and "bears" are not over-scrupulous in playing a
joke on a reporter sometimes, when they have an end in view, and
unless the commercial editor of a paper is well up to his work he and
his constituents will be often lead astray. He is supposed to be well
versed in every topic of the commercial world, in stocks and
produce, railroads, steamboats, dry-goods, hardware, and
everything whereby men make gain.
The exchange editor of a newspaper is a man with an eye which just
covers a page of print, no matter what the size. Through his hands
pass all the newspapers received at the office, except, perhaps,
those on special subjects, which may go to the different editors. He
is usually armed with a huge pair of shears, and as he rapidly opens
one paper after another, falling on something here and there of
interest or probable interest, it is cut out for revision and perhaps
republication. He is the "paste and scissors" editor so much talked
and read about, but has no little responsibility in making a paper
readable and "newsy." From the force of education or habit he
knows exactly where to look for the kind of information he requires,
and a single rapid glance over a page tells him at once if there is
anything there for him. He is naturally well-informed in all matters
interesting the country outside the city he is in, and thus becomes
an authority on local politics.
The ubiquitous members of a daily newspaper staff are the city
reporters. The education of habit can hardly go further than is
shown in their lives. Unconsciously they are drawn to where some
event is happening, or about to happen, and if the reporters are on
the qui vive, but little need escape them. Gathering information is as
much a matter of habit as the duties of the table. A reporter cannot
stray along the street without finding something to make a note of,
and the note is made in his mind if not in his book.
WAITING FOR THE EDITOR.

His perseverance is unmeasurable, his tact perfect, his courage


undoubted, and his audacity—perhaps the least said of this the
better! But it must be of a very peculiar nature—there must be no
swagger about it. A reporter should not be what is best described by
the vulgar term "cheeky." Such a one will never succeed. He must
rather have a quiet determination which will overcome all obstacles,
together with a modest demeanor and sufficient self-confidence "not
to stand any nonsense;" be fluent of speech and speak with
authority when he has anything to say; have a perfect knowledge of
men and things of interest, and be an easy, rapid and fluent writer.
It may be said that such a man would be a paragon of excellencies.
However this may be, a first-class reporter is not often met, and
seldom remains a reporter very long, except under specially
favorable circumstances, for the opportunities to pursue other
occupations, if he be a man of good character, are not few. But once
a reporter, the reporting spirit never leaves him. The occupation is so
full of variety and interest, that the mind constantly reverts to it. He
has plenty of drudgery also. Sitting up till midnight or daylight to
make a good resume of some dry speech is not pleasant work;
digesting long and complicated reports, and many other duties, are
mere drudgery, and form no small fraction of his duties. To these,
however, are added the excitement belonging to the work of a
detective who is employed in searching out hidden things; that of a
lawyer examining and cross-examining a witness in order to arrive at
the truth; of a judge weighing the evidence from all sides to come to
something like a satisfactory decision on troublesome questions. It
may be thought that this is an ideal view of a reporter, and that the
reality is never met with in real life. But the ideal has often been
reached, and during the comparatively short life of the Witness there
have been connected with it in this and other capacities gentlemen
whose names rank with the highest in commercial and professional
life. The ranks of the press in England, France, and the United
States, as well as Canada, are constantly being infringed on to fill
those of legislators, business men and authors. There is one thing
connected with reporting which always has had a tendency to lower
it in the public estimation. It has been considered a means of
providing men of ability, but lax in morals and irregular in habits, a
means of obtaining a precarious livelihood. This has made the
dangers to be met with in this course of life very great, because of
the associations surrounding those engaged in it, and at one time it
was supposed to be almost impossible to be a reporter and a well-
living man. But the days of "Bohemianism" have passed in Canada,
and for years there has but very seldom been a reporter on the
Witness who was not at the same time a total abstainer from all that
intoxicates.
We might mention very many interesting instances, showing under
what difficulties information is sometimes obtained, how "secret"
meetings are reported in full, and how but very little that reporters
want to know is hid, but space will not permit.
THE LIBRARY.

We will now rapidly run through the Witness office. It occupies two
large, three-story buildings, one fronting on St. Bonaventure street,
Montreal, and the other extending back almost to Craig street in the
rear. These two buildings are united by an enclosed space, which is
utilized as an engine-room and storehouse. This portion is covered
with a glass roof to give light to both of the buildings, which are
connected by bridges ornamented with flowers and musical with the
songs of birds, as suggested by the engraving. Entering by the front
door from St. Bonaventure street is the business office. Ascending
the large staircase shown, the editorial and reporting rooms are
reached. In the latter is the library for the use of the Witness
employees, containing over one thousand volumes. These books are
lent free to all engaged in the office desirous of reading them. The
principal English, American and Canadian papers are also kept on
file. On the same flat is the correspondence department,—in which
young ladies do most of the work,—the engraving department, the
editor of the Aurore, and the desk of the mechanical manager. Going
up stairs still higher, the "news" room is reached, where the
compositors of the Daily Witness perform their duties. The managing
editor and the proof-readers monopolize a corner of this room.
Crossing one of the bridges previously referred to, the electrotyping
department is seen occupying a partitioned-off corner of the very
large and airy "job" office, where are the compositors of the Dominion
Monthly, and where any amount of pamphlets, books, and of job
work is turned out each year. Taking the hoist we descend to the
next floor, which is occupied by the binding and folding room. Here
also the mailing lists are kept and scores of "chases" full of names
are to be seen, as well as the machines for mailing the papers. This
room is the one shown in the illustration of the dinner to the
newsboys, the tables, however being covered with something, to
them, more attractive than sheets of pamphlets, while the walls are
draped with the national flags. This room has been formally devoted
to any reunions the employees may decide to hold for their own
entertainment. Descending still another story, we reach the
pressroom, where the huge eight feeder, nineteen feet high, thirty
feet long and six broad, is turning out sixteen thousand printed
sheets an hour. The double building occupies 7,300 feet of ground
and 20,400 feet of flooring, besides cellarage.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

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.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookultra.com

You might also like