Beginning C 2008 From Novice To Professional Second Edition Christian Gross
Beginning C 2008 From Novice To Professional Second Edition Christian Gross
https://ebookfinal.com/download/beginning-vb-2008-from-novice-to-
professional-1st-edition-christian-gross-auth/
https://ebookfinal.com/download/beginning-c-from-novice-to-
professional-beginning-from-novice-to-professional-4th-ed-edition-
ivor-horton/
https://ebookfinal.com/download/beginning-visual-web-programming-in-c-
from-novice-to-professional-1st-edition-daniel-cazzulino/
https://ebookfinal.com/download/beginning-fedora-from-novice-to-
professional-2nd-edition-keir-thomas/
Beginning Hibernate From Novice to Professional 1st
Edition Dave Minter
https://ebookfinal.com/download/beginning-hibernate-from-novice-to-
professional-1st-edition-dave-minter/
https://ebookfinal.com/download/beginning-python-from-novice-to-
professional-4th-edition-magnus-lie-hetland/
https://ebookfinal.com/download/beginning-php-and-oracle-from-novice-
to-professional-1st-edition-bob-bryla/
https://ebookfinal.com/download/beginning-php-and-mysql-from-novice-
to-professional-4th-edition-w-jason-gilmore/
■■■
Christian Gross
Beginning C# 2008: From Novice to Professional, Second Edition
Copyright © 2008 by Christian Gross
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN-13 (pbk): 978-1-4302-1033-7
ISBN-13 (electronic): 978-1-4302-1034-4
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
Lead Editor: Ewan Buckingham
Technical Reviewer: Christian Kenyeres
Editorial Board: Editorial Board: Clay Andres, Steve Anglin, Ewan Buckingham, Tony Campbell, Gary
Cornell, Jonathan Gennick, Matthew Moodie, Joseph Ottinger, Jeffrey Pepper, Frank Pohlmann, Ben
Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh
Project Manager: Sofia Marchant
Developmental Editor: Ron Pronk
Copy Editor: Damon Larson
Associate Production Director: Kari Brooks-Copony
Production Editor: Laura Esterman
Compositors: Susan Glinert and Octal Publishing, Inc.
Proofreader: Lisa Hamilton
Indexer: Broccoli Information Management
Artist: April Milne
Cover Designer: Kurt Krames
Manufacturing Director: Tom Debolski
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail [email protected], or
visit http://www.springeronline.com.
For information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600,
Berkeley, CA 94705. Phone 510-549-5930, fax 510-549-5939, e-mail [email protected], or visit
http://www.apress.com.
Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use.
eBook versions and licenses are also available for most titles. For more information, reference our Special
Bulk Sales–eBook Licensing web page at http://www.apress.com/info/bulksales.
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution
has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to
any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly
by the information contained in this work.
The source code for this book is available to readers at http://www.apress.com.
Some food for thought when writing software:
“The major difference between a thing that might go wrong and a thing that
cannot possibly go wrong is that when a thing that cannot possibly go wrong goes
wrong it usually turns out to be impossible to get at or repair.”
■INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
v
Contents
vii
viii ■C O N T E N T S
■INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
About the Author
Many people say that by looking at a person’s dog, you can tell what the
person is like. Well, the picture is of my dog Louys, an English bulldog.
And yes, my English bulldog and I have many common characteristics.
But what about the biography of the author, CHRISTIAN GROSS? It’s
pretty simple: I’m a guy who has spent oodles of time strapped to a chair
debugging and taking apart code. In fact, I really enjoy this business we
call software development. I have loved it ever since I learned how to peek
and poke my first bytes. I have written various books, including Ajax and REST Recipes:
A Problem-Solution Approach, Foundations of Object-Oriented Programming Using .NET
2.0 Patterns, and A Programmer’s Introduction to Windows DNA, all available from Apress.
These days, I enjoy coding and experimenting with .NET, as it is a fascinating environment.
.NET makes me feel like a kid opening a present on Christmas morning. You had an idea what
the gift was, but you were not completely sure. And with .NET, there is no relative giving you
socks or a sweater. It’s excitement all the way!
xvii
About the Technical Reviewer
xix
Introduction
T he first computer programming book I read was entitled Programming Windows 3.0 by
Charles Petzold. This was around the time when Microsoft Windows 3.0 (circa 1992) once and
for all showed the industry that Microsoft was a company with a future. Writing code for Windows
back then was complicated by many things: lack of documentation, 16-bit architecture, and the
necessity of buying a compiler separate from the software development kit (SDK). Charles’s
book tied everything together and solved the problem of how to write a program for Windows.
Now the problems are quite the opposite: we have too much documentation, we have
64-bit architectures, and everything including the kitchen sink is thrown into a development
environment. Now we need to figure out what we actually need. We have too many options—too
many ways to solve the same problem. What I am trying to do with this book is the same thing
that Charles did for me when I first started out, and that was to help me figure out what I needed
to write code.
This book is about explaining the C# programming language in the context of solving prob-
lems. C# has become a sophisticated programming language that can achieve many goals, but
you are left wondering what techniques to use when. This book is here to answer your questions.
This book is not a reference to all of the features of the C# programming language. I don’t
explain the esoteric C# features. I stick to the C# programming features that you will use day
in and day out. That does not mean that you will be missing certain C# programming language
constructs, because I have covered all of the major features.
To get the full benefit of this book, I suggest that you do the exercises at the end of the chapters.
The answers are available on the Apress web site (http://www.apress.com), and you can cheat
and not do the exercises, but I advise against that.
If you are a beginning programmer who has no clue about C#, and you read this book
and do the exercises, I am almost entirely sure that you will be a solid and knowledgeable C#
programmer by the end of the book. If that sounds like a big promise, well, yes it is. The chapter
text is intended to get you acquainted with the C# programming language and how to apply its
features. The exercises are intended to make sure you actually understand the C# programming
language and its features.
The chapter exercises are challenging. They cannot be solved within a few minutes. In fact,
when I did all of the exercises, it took me five working-hour days to do all of them!
If you have any questions, such as, “So what was he trying to get at with that exercise?” I am
available on Skype with the user ID christianhgross. Please don’t just ring me. First chat using
text, and if necessary, we can have a voice conversation. Also, you can send e-mail to me at
[email protected].
Thanks and good luck.
xxi
CHAPTER 1
■■■
T his book is about the C# programming language and helping you become a proficient C#
programmer—even if you’ve never programmed before or you’ve only worked with procedural
languages like Visual Basic. (C# is called an object-oriented language, which differs in approach
from procedural languages like Visual Basic, Pascal, COBOL, and a lot of others that have been
just about left for dead.) Object-oriented languages are not only the wave of the future, they’re
the wave of today. You can’t program for the Web if you don’t know how to use an object-
oriented language like Java, C++, or C#. And if you want to use the .NET platform to program
web sites and web data exchanges (an extremely popular approach), then C# is the language
you want to learn.
In this chapter, you’ll get started by acquiring the tools you need to develop C# applica-
tions and taking tools for a test spin. Along the way, you’ll create a few C# applications.
■Note This book covers the C# 3.0 programming language as it’s used to write applications for the .NET
Framework. With C# 3.0, you’ll use the .NET 3.0 and 3.5 Frameworks. .NET 3.0 provides you with all of the
programming and coding essentials, and .NET 3.5 gives you a lot of extras and many additional programming
options.
For the examples in this book, we’ll use Visual C# 2008 Express Edition. Why? Well, it’s
freely available and has everything you need to get started with C# 3.0. The other Express
Edition IDEs available from Microsoft are tailored to different languages (Visual Basic and C++)
or, in the case of Visual Web Developer Express, support specific functionality that is too
restrictive for our purposes.
1
2 CHAPTER 1 ■ READY, STEADY, GO!
Microsoft also offers full versions of the Visual Studio IDE, such as the Standard, Profes-
sional, and Team editions. Each of these editions has different feature sets and different price
tags. See the Microsoft Visual Studio Web site (http://msdn2.microsoft.com/en-us/vstudio/
default.aspx) for more information. If you already have Visual Studio 2008 Professional installed,
you can use that for the examples in this book. The Visual Studio 2008 edition can do every-
thing that Visual C# Express can do, and, in fact, has more options.
■Note I personally use Visual Studio Standard or Professional in combination with other tools such as
X-develop and JustCode! from Omnicore (http://www.omnicore.com), TestDriven.NET (http://
www.testdriven.net/), and NUnit (http://www.nunit.org). The Visual Studio products are very good,
but others are available. Being a good developer means knowing which tools are available and determining
which tools will work best for you.
Installing and downloading Visual C# Express from the Microsoft web site involves the
transfer of large files. If you don’t have a broadband connection, you might prefer to install the
IDE from a CD, which you can order from Microsoft’s online site.
1. Go to http://msdn.microsoft.com/vstudio/express/.
3. Select Windows Development (because, for the scope of this book, that is what you’ll
be doing).
5. You’ll see a list of Visual Studio Express editions, as shown in Figure 1-1. Click Visual C#
2008 Express Edition.
6. A dialog box appears, asking where you want to store the downloaded file. The file that
you are downloading is a small bootstrap file, which you’ll use to begin the actual instal-
lation of the Visual C# Express IDE. Choose to save the file on the desktop.
These steps can be carried out very quickly—probably within a few minutes. If you follow
this process, please don’t mistake the procedure for downloading the complete Visual C# Express
application, because that’s not what happened. The installation procedure itself (which you’ll
perform next) will download the vast majority of the IDE. At this point, you’re just downloading
the initial setup file.
CHAPTER 1 ■ READY, STEADY, GO! 3
After you’ve downloaded the setup file, you can start the Visual C# Express installation.
During this process, all the pieces of the IDE—about 300MB—are downloaded and installed.
Follow these steps:
1. On your desktop, double-click the vcssetup.exe file. Wait while the setup program
loads all the required components.
3. A series of dialog boxes will appear. Select the defaults, and click Next to continue
through the setup program. In the final dialog box, click Install.
4. After all the elements have been downloaded and installed, you may need to restart
your computer.
After Visual C# Express has been installed, you can start it by selecting it from the Start menu.
Discovering Diverse Content Through
Random Scribd Documents
consists in knowing the explanation of words, and that greater
perfection is attained by employing more words and longer speech.
It is, however, right that we should examine the Scriptural texts by
the intellect, after having acquired a knowledge of demonstrative
science, and of the true hidden meaning of prophecies. But if one
has obtained some knowledge in this matter he must not preach on
it, as I stated in my Commentary on the Mishnah (Ḥagigah, ii. 7),
and our Sages said distinctly: From the beginning of the book to this
place—after the account of the sixth day of the Creation—it is “the
glory of God to conceal a thing” (Prov. xxv. 2).
We have thus clearly stated our opinion. It is, however, part of the
Divine plan that every one who has obtained some perfection
transmit it to some other persons, as will be shown in the chapter on
Prophecy. It is, therefore, impossible for a scholar to possess
knowledge of these problems, whether it be through his own
researches or through his master’s teaching, without communicating
part of that knowledge to others; it cannot be done in clear words; it
must be done sparingly by way of hints. We find in the words of
some of our Sages numerous hints and notes of this kind, but mixed
up with the words of others and with other subjects. In treating of
these mysteries, as a rule, I quote as much as contains the principal
idea, and leave the rest for those who are worthy of it.
After these two remarks I will proceed to the chapter which I have
promised.
[Contents]
CHAPTER XXX
There is a difference between first and beginning (or principle). The
latter exists in the thing of which it is the beginning, or co-exists
with it; it need not precede it; e.g., the heart is the beginning of the
living being; the element is the beginning of that of which it is the
basis. The term “first” is likewise applied to things of this kind; but is
also employed in cases where precedence in time alone is to be
expressed, and the thing which precedes is not the beginning (or the
cause) of the thing that follows. E.g., we say A. was the first
inhabitant of this house, after him came B; this does not imply that
A is the cause of B inhabiting the house. In Hebrew, teḥillah is used
in the sense of “first”; e.g., when God first (teḥillat) spake to Hosea
(Hos. i. 1), and the “beginning” is expressed by reshith, derived from
rosh, “head,” the principal part of the living being as regards
position. The Universe has not been created out of an element that
preceded it in time, since time itself formed part of the Creation. For
this reason Scripture employs the term “bereshit” (in a principle), in
which the beth is a preposition denoting “in.” The true explanation of
the first verse of Genesis is as follows: “In [creating] a principle God
created the beings above and the things below.” This explanation is
in accordance with the theory of the Creation. We find that some of
our Sages are reported to have held the opinion that time existed
before the Creation. But this report is very doubtful, because the
theory that time cannot be imagined with a beginning, has been
taught by Aristotle, as I showed you, and is objectionable. Those
who have made this assertion have been led to it by a saying of one
of our Sages in reference to the terms “one day,” “a second day.”
Taking these terms literally, the author of that saying asked, What
determined “the first day,” since there was no rotating sphere, and
no sun? and continues as follows: Scripture uses the term “one day”;
R. Jehudah, son of R. Simon, said: “Hence we learn that the
divisions of time have existed previously.” R. Abahu said, “Hence we
learn that God built worlds and again destroyed them.” This latter
exposition is still worse than the former. Consider the difficulty which
these two Rabbis found in the statement that time existed before
the creation of the sun. We shall undoubtedly soon remove this
difficulty, unless these two Rabbis intended to infer from the
Scriptural text that the divisions of time must have existed before
the Creation, and thus adopted the theory of the Eternity of the
Universe. But every religious man rejects this. The above saying is,
in my opinion, certainly of the same character as that of R. Eliezer,
“Whence were the heavens created,” etc., (chap. xxvi.). In short, in
these questions, do not take notice of the utterances of any person.
I told you that the foundation of our faith is the belief that God
created the Universe from nothing; that time did not exist previously,
but was created; for it depends on the motion of the sphere, and the
sphere has been created. [213]
You must know that the particle et in the phrase et ha-shamayim ve-
et ha-areẓ (“the heavens and the earth”) signifies “together with”;
our Sages have explained the word in the same sense in many
instances. Accordingly they assume that God created with the
heavens everything that the heavens contain, and with the earth
everything the earth includes. They further say that the
simultaneous Creation of the heavens and the earth is implied in the
words, “I call unto them, they stand up together” (Ps. xlviii.).
Consequently, all things were created together, but were separated
from each other successively. Our Sages illustrated this by the
following simile: We sow various seeds at the same time; some
spring forth after one day, some after two, and some after three
days, although all have been sown at the same time. According to
this interpretation, which is undoubtedly correct, the difficulty is
removed, which led R. Jehudah, son of R. Simon, to utter the above
saying, and consisted in the doubt as to the thing by which the first
day, the second, and the third were determined. In Bereshit Rabba,
our Sages, speaking of the light created on the first day according to
the Scriptural account, say as follows: these lights [of the luminaries
mentioned in the Creation of the fourth day] are the same that were
created on the first day, but were only fixed in their places on the
fourth day. The meaning [of the first verse] has thus been clearly
stated.
The phrase, “And he divided between the waters,” etc., does not
describe a division in space, as if the one part were merely above
the other, whilst the nature of both remained the same, but a
distinction as regards their nature or form. One portion of that which
was first called water was made one thing by certain properties it
received, and another portion received a different form, and this
latter portion is that which is commonly called water and of this it is
said, “And the gathering of the waters he called Seas.” Scripture
even indicates that the first mayim (“water”) in the phrase, “On the
face of the waters,” does not refer to the waters which form the
seas; and that part of the element “water,” having received a
particular form, and being above the air, is distinguished from the
other part which has received the form of ordinary water. For the
words, “And he divided between the waters which are beneath the
firmament and the waters which are above the firmament,” are
similar in meaning to the phrase, “And God divided between the light
and the darkness,” and refer to a distinction by a separate form. The
firmament itself was formed of water; and in the words of our Sages
(Bereshit Rabba; cap. iv.), “The middle drop congealed and formed
the heavens.”
This verse shows clearly that the stars, the sun, and the moon are
not, as people believe, on the surface of the spheres, but they are
fixed in the spheres, and this has been proved satisfactorily, there
being no vacuum in the Universe; for it is said, “in the firmament of
the heaven,” and not “upon the firmament of the heaven.”
It is therefore clear that there has been one common element called
water, which has been afterwards distinguished by three different
forms; one part forms the seas, another the firmament, and a third
part is over the firmament, and all this is separate from the earth.
The Scriptural text follows here a [215]peculiar method in order to
indicate some extraordinary mysteries. It has also been declared by
our Sages that the portion above the firmament is only water by
name, not in reality, for they say (Babyl. Talmud, Ḥagigah 14b) “Four
entered the paradise,” etc. R. Akiba said to them, “When you come
to the stores of pure marble, do not say, Water, water, for it is
written, ‘He that telleth lies shall not tarry in my sight’ ” (Ps. ci. 7).
Consider, if you belong to the class of thinking men, how clearly and
distinctly this passage explains the subject for those who reflect on
it! Understand that which has been proved by Aristotle in his book
On Meteorology, and note whatever men of science have said on
meteorological matters.
Note also the saying of our Sages: “When the Universe was created,
all things were created with size, intellect, and beauty fully
developed, i.e., everything was created perfect in magnitude and
form, and endowed with the most suitable properties; the word
ẓibyonam (their beauty) used here has the same meaning as ẓebi,
‘glory’ ” (Ezek. xx. 6). Note this likewise, for it includes a principle
fully established.
The following point now claims our attention. The account of the six
days of creation contains, in reference to the creation of man, the
statement: “Male and female created he them” (i. 27), and
concludes with the words: “Thus the heavens and the earth were
finished, and all the host of them” (ii. 1), and yet the portion which
follows describes the creation of Eve from Adam, the tree of life, and
the tree of knowledge, the history of the serpent and the events
connected therewith, and all this as having taken place after Adam
had been placed in the Garden of Eden. All our Sages agree that this
took place on the sixth day, and that nothing new was created after
the close of the six days. None of the things mentioned above is
therefore impossible, because the laws of Nature were then not yet
permanently fixed. There are, however, some utterances of our
Sages on this subject [which apparently imply a different view]. I will
gather them from their different sources and place them before you,
and I will refer also to certain things by mere hints, just as has been
done by the Sages. You must know that their words, which I am
about to quote, are most perfect, most accurate, and clear to those
for whom they were said. I will therefore not add long explanations,
lest I make their statements plain, and I might thus become “a
revealer of secrets,” but I will give them in a certain order,
accompanied with a few remarks, which will suffice for readers like
you.
One of these utterances is this: “Adam and Eve were at first created
as one being, having their backs united; they were then separated,
and one half was removed and brought before Adam as Eve.” The
term mi-ẓalʻotav (lit. “of his ribs”) signifies “of his sides.” The
meaning of the word is proved by referring to ẓelʻa, “the side” of the
tabernacle (Exod. xxvi. 20), which Onkelos renders setar (“side”),
and so also mi-ẓalʻotav is rendered by him “mi-sitrohi” (of his sides).
Note also how clearly it has been stated that Adam and Eve were
two in some respects, and yet they remained one, according to the
words, “Bone of my bones, and flesh of my flesh” (Gen. ii. 23). The
unity of the two is proved by the fact that both have the same
name, for she is called ishshah (woman), because she was taken out
of ish (man), also by the words, “And shall cleave unto his wife, and
they shall be one flesh” (ii. 24). How great is the ignorance of those
who do not [217]see that all this necessarily includes some [other]
idea [besides the literal meaning of the words]. This is now clear.
[Contents]
CHAPTER XXXI
It is perhaps clear why the laws concerning Sabbath are so severe,
that their transgression is visited with death by stoning, and that the
greatest of the prophets put a person to death for breaking the
Sabbath. The commandment of the Sabbath is the third from the
commandment concerning the existence and the unity of God. For
the commandment not to worship any other being is merely an
explanation of the first. You know already from what I have said,
that no opinions retain their vitality except those which are
[219]confirmed, published, and by certain actions constantly revived
among the people. Therefore we are told in the Law to honour this
day; in order to confirm thereby the principle of Creation which will
spread in the world, when all peoples keep Sabbath on the same
day. For when the question is asked, why this is done, the answer is
given: “For in six days the Lord hath made,” etc. (Exod. xx. 11). Two
different reasons are given for this commandment, because of two
different objects. In the Decalogue in Exodus, the following reason is
given for distinguishing the Sabbath: “For in six days,” etc. But in
Deuteronomy (chap. v. 15) the reason is given: “And thou shalt
remember that thou hast been a slave in the land of Egypt, etc.,
therefore the Lord thy God commanded thee,” etc. This difference
can easily be explained. In the former, the cause of the honour and
distinction of the day is given; comp. “Therefore the Lord hath
blessed the day of the Sabbath and sanctified it” (Exod. xx. 10), and
the cause for this is, “For in six days,” etc. But the fact that God has
given us the law of the Sabbath and commanded us to keep it, is the
consequence of our having been slaves; for then our work did not
depend on our will, nor could we choose the time for it; and we
could not rest. Thus God commanded us to abstain from work on
the Sabbath, and to rest, for two purposes; namely, (1) That we
might confirm the true theory, that of the Creation, which at once
and clearly leads to the theory of the existence of God. (2) That we
might remember how kind God has been in freeing us from the
burden of the Egyptians.—The Sabbath is therefore a double
blessing: it gives us correct notions, and also promotes the well-
being of our bodies.
[Contents]
CHAPTER XXXII
There are as many different opinions concerning Prophecy as
concerning the Eternity or Non-Eternity of the Universe. For we have
shown that those who assume the existence of God as proved may
be divided into three classes, according to the view they take of the
question, whether the Universe is eternal or not. Similarly there are
three different opinions on Prophecy. I will not notice the view of the
Atheist; he does not believe in the Existence of God, much less in
Prophecy; but I will content myself with discussing the various
opinions [on Prophecy] held by those who believe in God.
[Contents]
CHAPTER XXXIII
It is clear to me that what Moses experienced at the revelation on
Mount Sinai was different from that which was experienced by all the
other Israelites, for Moses alone was addressed by God, and for this
reason the second person singular is used in the Ten
Commandments; Moses then went down to the foot of the mount
and told his fellow-men what he had heard. Comp., “I stood
between the Lord and you at that time to tell you the word of the
Lord” (Deut. v. 5). Again, “Moses spake, and God answered him with
a loud voice” (Exod. xix. 19). In the Mechilta our Sages say distinctly
that he brought to them every word as he had heard it.
Furthermore, the words, “In order that the people hear when I
speak with thee” (Exod. xix. 9), show that God spoke to Moses, and
the people only heard the mighty sound, not distinct words. It is to
the perception of this mighty sound that Scripture [222]refers in the
passage, “When ye hear the sound” (Deut. v. 20); again it is stated,
“You heard a sound of words” (ibid. iv. 12), and it is not said “You
heard words”; and even where the hearing of the words is
mentioned, only the perception of the sound is meant. It was only
Moses that heard the words, and he reported them to the people.
This is apparent from Scripture, and from the utterances of our
Sages in general. There is, however, an opinion of our Sages
frequently expressed in the Midrashim, and found also in the
Talmud, to this effect: The Israelites heard the first and the second
commandments from God, i.e., they learnt the truth of the principles
contained in these two commandments in the same manner as
Moses, and not through Moses. For these two principles, the
existence of God and His Unity, can be arrived at by means of
reasoning, and whatever can be established by proof is known by
the prophet in the same way as by any other person; he has no
advantage in this respect. These two principles were not known
through prophecy alone. Comp., “Thou hast been shown to know
that,” etc. (Deut. iv. 34). But the rest of the commandments are of
an ethical and authoritative character, and do not contain [truths]
perceived by the intellect. Notwithstanding all that has been said by
our Sages on this subject, we infer from Scripture as well as from
the words of our Sages, that the Israelites heard on that occasion a
certain sound which Moses understood to proclaim the first two
commandments, and through Moses all other Israelites learnt them
when he in intelligible sounds repeated them to the people. Our
Sages mention this view, and support it by the verse, “God hath
spoken once; twice have I heard this” (Ps. lxii. 11). They state
distinctly, in the beginning of Midrash Ḥazita, that the Israelites did
not hear any other command directly from God; comp. “A loud voice,
and it was not heard again” (Deut. v. 19). It was after this first
sound was heard that the people were seized with the fear and
terror described in Scripture, and that they said, “Behold the Lord
our God has shown us, etc., and now why shall we die, etc. Come
thou near,” etc. Then Moses, the most distinguished of all mankind,
came the second time, received successively the other
commandments, and came down to the foot of the mountain to
proclaim them to the people, whilst the mighty phenomena
continued; they saw the fire, they heard the sounds, which were
those of thunder and lightning during a storm, and the loud sound of
the shofar; and all that is said of the many sounds heard at that
time, e.g., in the verse, “and all the people perceived the sounds,”
etc., refers to the sound of the shofar, thunder, and similar sounds.
But the voice of the Lord, that is, the voice created for that purpose,
which was understood to include the diverse commandments, was
only heard once, as is declared in the Law, and has been clearly
stated by our Sages in the places which I have indicated to you.
When the people heard this voice their soul left them; and in this
voice they perceived the first two commandments. It must, however,
be noticed that the people did not understand the voice in the same
degree as Moses did. I will point out to you this important fact, and
show you that it was a matter of tradition with the nation, and well
known by our Sages. For, as a rule, Onkelos renders the word va-
yedabber by u-mallel (“and God spake”); this is also the case with
this word in the beginning of the twentieth chapter of Exodus, but
the words ve-al yedabber immanu elohim, “let not God speak to us”
[223](Exod. xx. 19), addressed by the people to Moses, is rendered
vela yitmallel immanu min kodam adonai (“Let not aught be spoken
to us by the Lord”). Onkelos makes thus the same distinction which
we made. You know that according to the Talmud Onkelos received
all these excellent interpretations directly from R. Eliezer and R.
Joshua, the wisest men in Israel. Note it, and remember it, for it is
impossible for any person to expound the revelation on Mount Sinai
more fully than our Sages have done, since it is one of the secrets of
the Law. It is very difficult to have a true conception of the events,
for there has never been before, nor will there ever be again,
anything like it. Note it.
[Contents]
CHAPTER XXXIV
The meaning of the Scriptural passage, “Behold I will send an angel
before thee,” etc. (Exod. xxiii. 20), is identical with the parallel
passage in Deuteronomy which God is represented to have
addressed to Moses at the revelation on Mount Sinai, namely, “I will
raise them up a prophet from among their brethren,” etc. (Deut.
xviii. 18). The words, “Beware of him, and obey his voice,” etc., said
in reference to the angel, prove [that this passage speaks of a
prophet]. For there is no doubt that the commandment is given to
the ordinary people, to whom angels do not appear with
commandments and exhortations, and it is therefore unnecessary to
tell them not to disobey him. The meaning of the passage quoted
above is this: God informs the Israelites that He will raise up for
them a prophet, to whom an angel will appear in order to speak to
him, to command him, and to exhort him; he therefore cautions
them not to rebel against this angel, whose word the prophet will
communicate to them. Therefore it is expressly said in Deuteronomy,
“Unto him ye shall hearken” (Deut. xviii. 15); “And it shall come to
pass that whosoever shall not hearken unto my words which he shall
speak in my name,” etc. (ibid. 19). This is the explanation of the
words, “for my name is in him” (Exod. xxiv. 21). The object of all this
is to say to the Israelites, This great sight witnessed by you, the
revelation on Mount Sinai, will not continue for ever, nor will it ever
be repeated. Fire and cloud will not continually rest over the
tabernacle, as they are resting now on it; but the towns will be
conquered for you, peace will be secured for you in the land, and
you will be informed of what you have to do, by an angel whom I
will send to your prophets; he will thus teach you what to do, and
what not to do. Here a principle is laid down which I have constantly
expounded, viz., that all prophets except Moses receive the prophecy
through an angel. Note it.
[Contents]
CHAPTER XXXV
I have already described the four points in which the prophecy of
Moses our Teacher was distinguished from that of other prophets, in
books accessible to every one, in the Commentary on the Mishnah
(Sanhedrin x. 1) and in Mishneh-torah (S. Maddʻa I. vii. 6); I have
also adduced evidence for my explanation, and shown the
correctness thereof. I need not repeat the subject here, nor is it
included in the theme of this work. For I must tell you that whatever
I say here of prophecy refers exclusively to the form of the prophecy
of all prophets before and after [224]Moses. But as to the prophecy of
Moses I will not discuss it in this work with one single word, whether
directly or indirectly, because, in my opinion, the term prophet is
applied to Moses and other men homonymously. A similar
distinction, I think, must be made between the miracles wrought by
Moses and those wrought by other prophets, for his signs are not of
the same class as the miracles of other prophets. That his prophecy
was distinguished from that of all his predecessors is proved by the
passage, “And I appeared to Abraham, etc., but by my name, the
Lord, I was not known unto them” (Exod. vi. 3). We thus learn that
his prophetic perception was different from that of the Patriarchs,
and excelled it; a fortiori it must have excelled that of other prophets
before Moses. As to the distinction of Moses’ prophecy from that of
succeeding prophets, it is stated as a fact, “And there arose not a
prophet since in Israel like unto Moses, whom the Lord knew face to
face” (Deut. xxxiv. 10). It is thus clear that his prophetic perception
was above that of later prophets in Israel, who are “a kingdom of
priests and a holy nation,” and “in whose midst is the Lord”; much
more is it above that of prophets among other nations.
The general distinction between the wonders of Moses and those of
other prophets is this: The wonders wrought by prophets, or for
them, are witnessed by a few individuals, e.g., the wonders wrought
by Elijah and Elisha; the king of Israel is therefore surprised, and
asked Gehazi to describe to him the miracles wrought by Elisha: “Tell
me, I pray thee, all the great things that Elisha hath done. And it
came to pass as he was telling, etc. And Gehazi said: ‘My lord, O
king, this is the woman, and this is her son, whom Elisha restored to
life’ ” (2 Kings viii. 4, 5). The same is the case with the signs of every
other prophet, except Moses our Teacher. Scripture, therefore
declares that no prophet will ever, like Moses, do signs publicly in the
presence of friend and enemy, of his followers and his opponents;
this is the meaning of the words: “And there arose not a prophet
since in Israel like unto Moses, etc., in all the signs and the wonders,
etc., in the sight of all Israel.” Two things are here mentioned
together; namely, that there will not arise a prophet that will
perceive as Moses perceived, or a prophet that will do as he did;
then it is pointed out that the signs were made in the presence of
Pharaoh, all his servants and all his land, the opponents of Moses,
and also in the presence of all the Israelites, his followers. Comp. “In
the sight of all Israel.” This is a distinction not possessed by any
prophet before Moses; nor, as is correctly foretold, will it ever be
possessed by another prophet. We must not be misled by the
account that the light of the sun stood still certain hours for Joshua,
when “he said in the sight of Israel,” etc. (Josh. x. 12); for it is not
said there “in the sight of all Israel,” as is said in reference to Moses.
So also the miracle of Elijah, at Mount Carmel, was witnessed only
by a few people. When I said above that the sun stood still certain
hours, I explain the words “ka-jom tamim” to mean “the longest
possible day,” because tamim means “perfect,” and indicates that
that day appeared to the people at Gibeon as their longest day in
the summer. Your mind must comprehend the distinction of the
prophecy and the wonders of Moses, and understand that his
greatness in prophetic perception was the same as his power of
producing miracles. If you further assume that we are unable fully to
comprehend the nature of this greatness, you will understand
[225]that when I speak, in the chapters which follow this, on
prophecy and the different classes of prophets, I only refer to the
prophets which have not attained the high degree that Moses
attained. This is what I desired to explain in this chapter.
[Contents]
CHAPTER XXXVI
Prophecy is, in truth and reality, an emanation sent forth by the
Divine Being through the medium of the Active Intellect, in the first
instance to man’s rational faculty, and then to his imaginative
faculty; it is the highest degree and greatest perfection man can
attain; it consists in the most perfect development of the imaginative
faculty. Prophecy is a faculty that cannot in any way be found in a
person, or acquired by man, through a culture of his mental and
moral faculties; for even if these latter were as good and perfect as
possible, they would be of no avail, unless they were combined with
the highest natural excellence of the imaginative faculty. You know
that the full development of any faculty of the body, such as the
imagination, depends on the condition of the organ, by means of
which the faculty acts. This must be the best possible as regards its
temperament and its size, and also as regards the purity of its
substance. Any defect in this respect cannot in any way be supplied
or remedied by training. For when any organ is defective in its
temperament, proper training can in the best case restore a healthy
condition to some extent, but cannot make such an organ perfect.
But if the organ is defective as regards size, position, or as regards
the substance and the matter of which the organ is formed, there is
no remedy. You know all this, and I need not explain it to you at
length.
Part of the functions of the imaginative faculty is, as you well know,
to retain impressions by the senses, to combine them, and chiefly to
form images. The principal and highest function is performed when
the senses are at rest and pause in their action, for then it receives,
to some extent, divine inspiration in the measure as it is predisposed
for this influence. This is the nature of those dreams which prove
true, and also of prophecy, the difference being one of quantity, not
of quality. Thus our Sages say, that dream is the sixtieth part of
prophecy; and no such comparison could be made between two
things of different kinds, for we cannot say the perfection of man is
so many times the perfection of a horse. In Bereshit Rabba (sect.
xvii.) the following saying of our Sages occurs, “Dream is the nobelet
(the unripe fruit) of prophecy.” This is an excellent comparison, for
the unripe fruit (nobelet) is really the fruit to some extent, only it
has fallen from the tree before it was fully developed and ripe. In a
similar manner the action of the imaginative faculty during sleep is
the same as at the time when it receives a prophecy, only in the first
case it is not fully developed, and has not yet reached its highest
degree. But why need I quote the words of our Sages, when I can
refer to the following passage of Scripture: “If there be among you a
prophet, I, the Lord, will make myself known unto him in a vision, in
a dream will I speak to him” (Num. xii. 6). Here the Lord tells us
what the real essence of prophecy is, that it is a perfection acquired
in a dream or in a vision (the original mareh is a noun derived from
the verb raah); the imaginative faculty acquires such an efficiency in
its action that it sees [226]the thing as if it came from without, and
perceives it as if through the medium of bodily senses. These two
modes of prophecy, vision and dream, include all its different
degrees. It is a well-known fact that the thing which engages greatly
and earnestly man’s attention whilst he is awake and in the full
possession of his senses forms during his sleep the object of the
action of his imaginative faculty. Imagination is then only influenced
by the intellect in so far as it is predisposed for such influence. It
would be quite useless to illustrate this by a simile, or to explain it
fully, as it is clear, and every one knows it. It is like the action of the
senses, the existence of which no person with common sense would
ever deny. After these introductory remarks you will understand that
a person must satisfy the following conditions before he can become
a prophet: The substance of the brain must from the very beginning
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.
ebookfinal.com