Ms Course 10266a Programming In C With Microsoft
Visual Studio 2010 Trainer Edition Volume 1
Microsoft download
https://ebookbell.com/product/ms-course-10266a-programming-in-c-
with-microsoft-visual-studio-2010-trainer-edition-
volume-1-microsoft-2113632
Explore and download more ebooks at ebookbell.com
Here are some recommended products that we believe you will be
interested in. You can click the link to download.
Ms Course 10266a Programming In C With Microsoft Visual Studio 2010
Trainer Edition Volume 2 Microsoft
https://ebookbell.com/product/ms-course-10266a-programming-in-c-with-
microsoft-visual-studio-2010-trainer-edition-
volume-2-microsoft-2113634
Planning Designing A Ms Lync Server 2010 Soln Course 10534a Trainer
Hbk
https://ebookbell.com/product/planning-designing-a-ms-lync-
server-2010-soln-course-10534a-trainer-hbk-4093606
Deploying Config Admin Ms Lync Server 2010 Course 10533a Trainer Hbk
https://ebookbell.com/product/deploying-config-admin-ms-lync-
server-2010-course-10533a-trainer-hbk-4089988
Moc Course 2783a Designing The Data Tier For Microsoft Sql Server
Delivery Guide
https://ebookbell.com/product/moc-course-2783a-designing-the-data-
tier-for-microsoft-sql-server-delivery-guide-1278240
Moc Course 2783a Designing The Data Tier For Microsoft Sql Server Beta
Trainer Guide
https://ebookbell.com/product/moc-course-2783a-designing-the-data-
tier-for-microsoft-sql-server-beta-trainer-guide-1278242
Moc Course 4356a Managing Branch Office Resources Using Microsoft
Windows Server R2
https://ebookbell.com/product/moc-course-4356a-managing-branch-office-
resources-using-microsoft-windows-server-r2-1278244
Moc Course 4357a Managing Data Storage Using Microsoft Windows Server
R2
https://ebookbell.com/product/moc-course-4357a-managing-data-storage-
using-microsoft-windows-server-r2-1278246
Moc Course 4358a Deploying And Managing Active Directory Federation
Services In Microsoft Windows Server R2
https://ebookbell.com/product/moc-course-4358a-deploying-and-managing-
active-directory-federation-services-in-microsoft-windows-
server-r2-1278248
The Atlantis Twins The Mermaid Curse Book One Ms Kaminsky Kaminsky
https://ebookbell.com/product/the-atlantis-twins-the-mermaid-curse-
book-one-ms-kaminsky-kaminsky-22477036
O F F I C I A L M I C R O S O F T L E A R N I N G P R O D U C T
10266A
Programming in C# with
Microsoft® Visual Studio® 2010
Be sure to access the extended learning content on your Course
Companion CD enclosed on the back cover of the book.
ii Programming in C# with Microsoft® Visual Studio® 2010
Information in this document, including URL and other Internet Web site references, is subject to
change without notice. Unless otherwise noted, the example companies, organizations, products,
domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious,
and no association with any real company, organization, product, domain name, e-mail address,
logo, person, place or event is intended or should be inferred. Complying with all applicable
copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part
of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted
in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for
any purpose, without the express written permission of Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.
The names of manufacturers, products, or URLs are provided for informational purposes only and
Microsoft makes no representations and warranties, either expressed, implied, or statutory,
regarding these manufacturers or the use of the products with any Microsoft technologies. The
inclusion of a manufacturer or product does not imply endorsement of Microsoft of the
manufacturer or product. Links may be provided to third party sites. Such sites are not under the
control of Microsoft and Microsoft is not responsible for the contents of any linked site or any link
contained in a linked site, or any changes or updates to such sites. Microsoft is not responsible for
webcasting or any other form of transmission received from any linked site. Microsoft is providing
these links to you only as a convenience, and the inclusion of any link does not imply endorsement
of Microsoft of the site or the products contained therein.
© 2010 Microsoft Corporation. All rights reserved.
Microsoft, and Windows are either registered trademarks or trademarks of Microsoft Corporation in
the United States and/or other countries.
All other trademarks are property of their respective owners.
Product Number: 10266A
Part Number: 01918
Released: 09/2010
MICROSOFT LICENSE TERMS
OFFICIAL MICROSOFT LEARNING PRODUCTS - TRAINER
EDITION – Pre-Release and Final Release Versions
These license terms are an agreement between Microsoft Corporation and you. Please read them. They
apply to the Licensed Content named above, which includes the media on which you received it, if any. The
terms also apply to any Microsoft
• updates,
• supplements,
• Internet-based services, and
• support services
for this Licensed Content, unless other terms accompany those items. If so, those terms apply.
By using the Licensed Content, you accept these terms. If you do not accept them, do not use
the Licensed Content.
If you comply with these license terms, you have the rights below.
1. DEFINITIONS.
a. “Academic Materials” means the printed or electronic documentation such as manuals,
workbooks, white papers, press releases, datasheets, and FAQs which may be included in the
Licensed Content.
b. “Authorized Learning Center(s)” means a Microsoft Certified Partner for Learning Solutions
location, an IT Academy location, or such other entity as Microsoft may designate from time to time.
c. “Authorized Training Session(s)” means those training sessions authorized by Microsoft and
conducted at or through Authorized Learning Centers by a Trainer providing training to Students
solely on Official Microsoft Learning Products (formerly known as Microsoft Official Curriculum or
“MOC”) and Microsoft Dynamics Learning Products (formerly know as Microsoft Business Solutions
Courseware). Each Authorized Training Session will provide training on the subject matter of one
(1) Course.
d. “Course” means one of the courses using Licensed Content offered by an Authorized Learning
Center during an Authorized Training Session, each of which provides training on a particular
Microsoft technology subject matter.
e. “Device(s)” means a single computer, device, workstation, terminal, or other digital electronic or
analog device.
f. “Licensed Content” means the materials accompanying these license terms. The Licensed
Content may include, but is not limited to, the following elements: (i) Trainer Content, (ii) Student
Content, (iii) classroom setup guide, and (iv) Software. There are different and separate
components of the Licensed Content for each Course.
g. “Software” means the Virtual Machines and Virtual Hard Disks, or other software applications that
may be included with the Licensed Content.
h. “Student(s)” means a student duly enrolled for an Authorized Training Session at your location.
i. “Student Content” means the learning materials accompanying these license terms that are for
use by Students and Trainers during an Authorized Training Session. Student Content may include
labs, simulations, and courseware files for a Course.
j. “Trainer(s)” means a) a person who is duly certified by Microsoft as a Microsoft Certified Trainer
and b) such other individual as authorized in writing by Microsoft and has been engaged by an
Authorized Learning Center to teach or instruct an Authorized Training Session to Students on its
behalf.
k. “Trainer Content” means the materials accompanying these license terms that are for use by
Trainers and Students, as applicable, solely during an Authorized Training Session. Trainer Content
may include Virtual Machines, Virtual Hard Disks, Microsoft PowerPoint files, instructor notes, and
demonstration guides and script files for a Course.
l. “Virtual Hard Disks” means Microsoft Software that is comprised of virtualized hard disks (such as
a base virtual hard disk or differencing disks) for a Virtual Machine that can be loaded onto a single
computer or other device in order to allow end-users to run multiple operating systems concurrently.
For the purposes of these license terms, Virtual Hard Disks will be considered “Trainer Content”.
m. “Virtual Machine” means a virtualized computing experience, created and accessed using
Microsoft® Virtual PC or Microsoft® Virtual Server software that consists of a virtualized hardware
environment, one or more Virtual Hard Disks, and a configuration file setting the parameters of the
virtualized hardware environment (e.g., RAM). For the purposes of these license terms, Virtual Hard
Disks will be considered “Trainer Content”.
n. “you” means the Authorized Learning Center or Trainer, as applicable, that has agreed to these
license terms.
2. OVERVIEW.
Licensed Content. The Licensed Content includes Software, Academic Materials (online and
electronic), Trainer Content, Student Content, classroom setup guide, and associated media.
License Model. The Licensed Content is licensed on a per copy per Authorized Learning Center
location or per Trainer basis.
3. INSTALLATION AND USE RIGHTS.
a. Authorized Learning Centers and Trainers: For each Authorized Training Session, you
may:
i. either install individual copies of the relevant Licensed Content on classroom Devices only for
use by Students enrolled in and the Trainer delivering the Authorized Training Session, provided
that the number of copies in use does not exceed the number of Students enrolled in and the
Trainer delivering the Authorized Training Session, OR
ii. install one copy of the relevant Licensed Content on a network server only for access by
classroom Devices and only for use by Students enrolled in and the Trainer delivering the
Authorized Training Session, provided that the number of Devices accessing the Licensed
Content on such server does not exceed the number of Students enrolled in and the Trainer
delivering the Authorized Training Session.
iii. and allow the Students enrolled in and the Trainer delivering the Authorized Training Session to
use the Licensed Content that you install in accordance with (ii) or (ii) above during such
Authorized Training Session in accordance with these license terms.
i. Separation of Components. The components of the Licensed Content are licensed as a single
unit. You may not separate the components and install them on different Devices.
ii. Third Party Programs. The Licensed Content may contain third party programs. These license
terms will apply to the use of those third party programs, unless other terms accompany those
programs.
b. Trainers:
i. Trainers may Use the Licensed Content that you install or that is installed by an Authorized
Learning Center on a classroom Device to deliver an Authorized Training Session.
ii. Trainers may also Use a copy of the Licensed Content as follows:
A. Licensed Device. The licensed Device is the Device on which you Use the Licensed Content.
You may install and Use one copy of the Licensed Content on the licensed Device solely for
your own personal training Use and for preparation of an Authorized Training Session.
B. Portable Device. You may install another copy on a portable device solely for your own
personal training Use and for preparation of an Authorized Training Session.
4. PRE-RELEASE VERSIONS. If this is a pre-release (“beta”) version, in addition to the other provisions
in this agreement, these terms also apply:
a. Pre-Release Licensed Content. This Licensed Content is a pre-release version. It may not
contain the same information and/or work the way a final version of the Licensed Content will. We
may change it for the final, commercial version. We also may not release a commercial version.
You will clearly and conspicuously inform any Students who participate in each Authorized Training
Session of the foregoing; and, that you or Microsoft are under no obligation to provide them with
any further content, including but not limited to the final released version of the Licensed Content
for the Course.
b. Feedback. If you agree to give feedback about the Licensed Content to Microsoft, you give to
Microsoft, without charge, the right to use, share and commercialize your feedback in any way and
for any purpose. You also give to third parties, without charge, any patent rights needed for their
products, technologies and services to use or interface with any specific parts of a Microsoft
software, Licensed Content, or service that includes the feedback. You will not give feedback that is
subject to a license that requires Microsoft to license its software or documentation to third parties
because we include your feedback in them. These rights survive this agreement.
c. Confidential Information. The Licensed Content, including any viewer, user interface, features
and documentation that may be included with the Licensed Content, is confidential and proprietary
to Microsoft and its suppliers.
i. Use. For five years after installation of the Licensed Content or its commercial release,
whichever is first, you may not disclose confidential information to third parties. You may
disclose confidential information only to your employees and consultants who need to know
the information. You must have written agreements with them that protect the confidential
information at least as much as this agreement.
ii. Survival. Your duty to protect confidential information survives this agreement.
iii. Exclusions. You may disclose confidential information in response to a judicial or
governmental order. You must first give written notice to Microsoft to allow it to seek a
protective order or otherwise protect the information. Confidential information does not
include information that
• becomes publicly known through no wrongful act;
• you received from a third party who did not breach confidentiality obligations to
Microsoft or its suppliers; or
• you developed independently.
d. Term. The term of this agreement for pre-release versions is (i) the date which Microsoft informs
you is the end date for using the beta version, or (ii) the commercial release of the final release
version of the Licensed Content, whichever is first (“beta term”).
e. Use. You will cease using all copies of the beta version upon expiration or termination of the beta
term, and will destroy all copies of same in the possession or under your control and/or in the
possession or under the control of any Trainers who have received copies of the pre-released
version.
f. Copies. Microsoft will inform Authorized Learning Centers if they may make copies of the beta
version (in either print and/or CD version) and distribute such copies to Students and/or Trainers. If
Microsoft allows such distribution, you will follow any additional terms that Microsoft provides to you
for such copies and distribution.
5. ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.
a. Authorized Learning Centers and Trainers:
i. Software.
ii. Virtual Hard Disks. The Licensed Content may contain versions of Microsoft XP, Microsoft
Windows Vista, Windows Server 2003, Windows Server 2008, and Windows 2000 Advanced
Server and/or other Microsoft products which are provided in Virtual Hard Disks.
A. If the Virtual Hard Disks and the labs are launched through the Microsoft
Learning Lab Launcher, then these terms apply:
Time-Sensitive Software. If the Software is not reset, it will stop running based upon the
time indicated on the install of the Virtual Machines (between 30 and 500 days after you
install it). You will not receive notice before it stops running. You may not be able to
access data used or information saved with the Virtual Machines when it stops running and
may be forced to reset these Virtual Machines to their original state. You must remove the
Software from the Devices at the end of each Authorized Training Session and reinstall and
launch it prior to the beginning of the next Authorized Training Session.
B. If the Virtual Hard Disks require a product key to launch, then these terms
apply:
Microsoft will deactivate the operating system associated with each Virtual Hard Disk.
Before installing any Virtual Hard Disks on classroom Devices for use during an Authorized
Training Session, you will obtain from Microsoft a product key for the operating system
software for the Virtual Hard Disks and will activate such Software with Microsoft using such
product key.
C. These terms apply to all Virtual Machines and Virtual Hard Disks:
You may only use the Virtual Machines and Virtual Hard Disks if you comply with
the terms and conditions of this agreement and the following security
requirements:
o You may not install Virtual Machines and Virtual Hard Disks on portable Devices or
Devices that are accessible to other networks.
o You must remove Virtual Machines and Virtual Hard Disks from all classroom Devices at
the end of each Authorized Training Session, except those held at Microsoft Certified
Partners for Learning Solutions locations.
o You must remove the differencing drive portions of the Virtual Hard Disks from all
classroom Devices at the end of each Authorized Training Session at Microsoft Certified
Partners for Learning Solutions locations.
o You will ensure that the Virtual Machines and Virtual Hard Disks are not copied or
downloaded from Devices on which you installed them.
o You will strictly comply with all Microsoft instructions relating to installation, use,
activation and deactivation, and security of Virtual Machines and Virtual Hard Disks.
o You may not modify the Virtual Machines and Virtual Hard Disks or any contents
thereof.
o You may not reproduce or redistribute the Virtual Machines or Virtual Hard Disks.
ii. Classroom Setup Guide. You will assure any Licensed Content installed for use during an
Authorized Training Session will be done in accordance with the classroom set-up guide for the
Course.
iii. Media Elements and Templates. You may allow Trainers and Students to use images, clip
art, animations, sounds, music, shapes, video clips and templates provided with the Licensed
Content solely in an Authorized Training Session. If Trainers have their own copy of the
Licensed Content, they may use Media Elements for their personal training use.
iv. iv Evaluation Software. Any Software that is included in the Student Content designated as
“Evaluation Software” may be used by Students solely for their personal training outside of the
Authorized Training Session.
b. Trainers Only:
i. Use of PowerPoint Slide Deck Templates. The Trainer Content may include Microsoft
PowerPoint slide decks. Trainers may use, copy and modify the PowerPoint slide decks only for
providing an Authorized Training Session. If you elect to exercise the foregoing, you will agree
or ensure Trainer agrees: (a) that modification of the slide decks will not constitute creation of
obscene or scandalous works, as defined by federal law at the time the work is created; and
(b) to comply with all other terms and conditions of this agreement.
ii. Use of Instructional Components in Trainer Content. For each Authorized Training
Session, Trainers may customize and reproduce, in accordance with the MCT Agreement, those
portions of the Licensed Content that are logically associated with instruction of the Authorized
Training Session. If you elect to exercise the foregoing rights, you agree or ensure the Trainer
agrees: (a) that any of these customizations or reproductions will only be used for providing an
Authorized Training Session and (b) to comply with all other terms and conditions of this
agreement.
iii. Academic Materials. If the Licensed Content contains Academic Materials, you may copy and
use the Academic Materials. You may not make any modifications to the Academic Materials
and you may not print any book (either electronic or print version) in its entirety. If you
reproduce any Academic Materials, you agree that:
• The use of the Academic Materials will be only for your personal reference or training use
• You will not republish or post the Academic Materials on any network computer or
broadcast in any media;
• You will include the Academic Material’s original copyright notice, or a copyright notice to
Microsoft’s benefit in the format provided below:
Form of Notice:
© 2010 Reprinted for personal reference use only with permission by Microsoft
Corporation. All rights reserved.
Microsoft, Windows, and Windows Server are either registered trademarks or
trademarks of Microsoft Corporation in the US and/or other countries. Other
product and company names mentioned herein may be the trademarks of their
respective owners.
6. INTERNET-BASED SERVICES. Microsoft may provide Internet-based services with the Licensed
Content. It may change or cancel them at any time. You may not use these services in any way that
could harm them or impair anyone else’s use of them. You may not use the services to try to gain
unauthorized access to any service, data, account or network by any means.
7. SCOPE OF LICENSE. The Licensed Content is licensed, not sold. This agreement only gives you some
rights to use the Licensed Content. Microsoft reserves all other rights. Unless applicable law gives you
more rights despite this limitation, you may use the Licensed Content only as expressly permitted in this
agreement. In doing so, you must comply with any technical limitations in the Licensed Content that
only allow you to use it in certain ways. You may not
• install more copies of the Licensed Content on classroom Devices than the number of Students and
the Trainer in the Authorized Training Session;
• allow more classroom Devices to access the server than the number of Students enrolled in and the
Trainer delivering the Authorized Training Session if the Licensed Content is installed on a network
server;
• copy or reproduce the Licensed Content to any server or location for further reproduction or
distribution;
• disclose the results of any benchmark tests of the Licensed Content to any third party without
Microsoft’s prior written approval;
• work around any technical limitations in the Licensed Content;
• reverse engineer, decompile or disassemble the Licensed Content, except and only to the extent
that applicable law expressly permits, despite this limitation;
• make more copies of the Licensed Content than specified in this agreement or allowed by applicable
law, despite this limitation;
• publish the Licensed Content for others to copy;
• transfer the Licensed Content, in whole or in part, to a third party;
• access or use any Licensed Content for which you (i) are not providing a Course and/or (ii) have not
been authorized by Microsoft to access and use;
• rent, lease or lend the Licensed Content; or
• use the Licensed Content for commercial hosting services or general business purposes.
• Rights to access the server software that may be included with the Licensed Content, including the
Virtual Hard Disks does not give you any right to implement Microsoft patents or other Microsoft
intellectual property in software or devices that may access the server.
8. EXPORT RESTRICTIONS. The Licensed Content is subject to United States export laws and
regulations. You must comply with all domestic and international export laws and regulations that apply
to the Licensed Content. These laws include restrictions on destinations, end users and end use. For
additional information, see www.microsoft.com/exporting.
9. NOT FOR RESALE SOFTWARE/LICENSED CONTENT. You may not sell software or Licensed
Content marked as “NFR” or “Not for Resale.”
10. ACADEMIC EDITION. You must be a “Qualified Educational User” to use Licensed Content marked as
“Academic Edition” or “AE.” If you do not know whether you are a Qualified Educational User, visit
www.microsoft.com/education or contact the Microsoft affiliate serving your country.
11. TERMINATION. Without prejudice to any other rights, Microsoft may terminate this agreement if you
fail to comply with the terms and conditions of these license terms. In the event your status as an
Authorized Learning Center or Trainer a) expires, b) is voluntarily terminated by you, and/or c) is
terminated by Microsoft, this agreement shall automatically terminate. Upon any termination of this
agreement, you must destroy all copies of the Licensed Content and all of its component parts.
12. ENTIRE AGREEMENT. This agreement, and the terms for supplements, updates, Internet-
based services and support services that you use, are the entire agreement for the Licensed
Content and support services.
13. APPLICABLE LAW.
a. United States. If you acquired the Licensed Content in the United States, Washington state law
governs the interpretation of this agreement and applies to claims for breach of it, regardless of
conflict of laws principles. The laws of the state where you live govern all other claims, including
claims under state consumer protection laws, unfair competition laws, and in tort.
b. Outside the United States. If you acquired the Licensed Content in any other country, the laws
of that country apply.
14. LEGAL EFFECT. This agreement describes certain legal rights. You may have other rights under the
laws of your country. You may also have rights with respect to the party from whom you acquired the
Licensed Content. This agreement does not change your rights under the laws of your country if the
laws of your country do not permit it to do so.
15. DISCLAIMER OF WARRANTY. The Licensed Content is licensed “as-is.” You bear the risk of
using it. Microsoft gives no express warranties, guarantees or conditions. You may have
additional consumer rights under your local laws which this agreement cannot change. To
the extent permitted under your local laws, Microsoft excludes the implied warranties of
merchantability, fitness for a particular purpose and non-infringement.
16. LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM
MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT
RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL,
INDIRECT OR INCIDENTAL DAMAGES.
This limitation applies to
• anything related to the Licensed Content, software, services, content (including code) on third party
Internet sites, or third party programs; and
• claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence,
or other tort to the extent permitted by applicable law.
It also applies even if Microsoft knew or should have known about the possibility of the damages. The
above limitation or exclusion may not apply to you because your country may not allow the exclusion or
limitation of incidental, consequential or other damages.
Please note: As this Licensed Content is distributed in Quebec, Canada, some of the clauses in
this agreement are provided below in French.
Remarque : Ce le contenu sous licence étant distribué au Québec, Canada, certaines des clauses
dans ce contrat sont fournies ci-dessous en français.
EXONÉRATION DE GARANTIE. Le contenu sous licence visé par une licence est offert « tel quel ». Toute
utilisation de ce contenu sous licence est à votre seule risque et péril. Microsoft n’accorde aucune autre
garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection dues
consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties
implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont
exclues.
LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES
DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de
dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation
pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de
bénéfices.
Cette limitation concerne:
• tout ce qui est relié au le contenu sous licence , aux services ou au contenu (y compris le code)
figurant sur des sites Internet tiers ou dans des programmes tiers ; et
• les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte,
de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur.
Elle s’applique également, même si Microsoft connaissait ou devrait connaître l’éventualité d’un tel
dommage. Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages
indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne
s’appliquera pas à votre égard.
EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits
prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de
votre pays si celles-ci ne le permettent pas.
Thank you for taking our training! We’ve worked together with our Microsoft Certified Partners
for Learning Solutions and our Microsoft IT Academies to bring you a world-class learning
experience—whether you’re a professional looking to advance your skills or a
student preparing for a career in IT.
n Microsoft Certified Trainers and Instructors—Your instructor is a technical and
instructional expert who meets ongoing certification requirements. And, if instructors
are delivering training at one of our Certified Partners for Learning Solutions, they are
also evaluated throughout the year by students and by Microsoft.
n Certification Exam Benefits—After training, consider taking a Microsoft Certification
		 exam. Microsoft Certifications validate your skills on Microsoft technologies and can help
		 differentiate you when finding a job or boosting your career. In fact, independent
		 research by IDC concluded that 75% of managers believe certifications are important to
		 team performance1
. Ask your instructor about Microsoft Certification exam promotions
		 and discounts that may be available to you.
n Customer Satisfaction Guarantee—Our Certified Partners for Learning Solutions offer
		 a satisfaction guarantee and we hold them accountable for it. At the end of class, please
		 complete an evaluation of today’s experience. We value your feedback!
We wish you a great learning experience and ongoing success in your career!
Sincerely,
Microsoft Learning
www.microsoft.com/learning
1
IDC, Value of Certification: Team Certification and Organizational Performance, November 2006
Welcome!
Programming in C# with Microsoft® Visual Studio® 2010 iii
Acknowledgement
Microsoft Learning would like to acknowledge and thank the following for their
contribution towards developing this title. Their effort at various stages in the
development has ensured that you have a good classroom experience.
John Sharp—Content Developer
John Sharp is a principal technologist at Content Master, part of CM Group Ltd, a
technical authoring and consulting company. An expert on developing
applications with the Microsoft® .NET Framework and interoperability issues, John
has produced numerous courses, tutorials, white papers, and presentations on
distributed systems, Web services, and the C# language. John is the author of
several popular books, including five editions of Microsoft Visual C# Step by Step
and Microsoft Windows Communication Foundation Step by Step.
Antony Norris—Content Developer
Antony Norris is a senior technologist at Content Master, part of CM Group Ltd, a
technical authoring and consulting company. Antony is a Microsoft Visual C#®
developer who specializes in various .NET Framework technologies, including
ASP.NET, Windows® Communication Foundation, and Windows Mobile. Antony
has worked on several other Microsoft Learning courses, including Programming
with the Microsoft .NET Framework Using Microsoft Visual Studio 2005 and Visual
Studio 2008 Connected Systems: Windows Communication Foundation.
Mike Sumsion—Content Developer
Mike Sumsion is a senior technologist at Content Master, part of CM Group Ltd, a
technical authoring and consulting company. Mike is a developer who specializes
in SharePoint Products and Technologies, .NET Framework client applications,
and Windows Mobile. Mike has worked on several other Microsoft Learning
courses, including Developing Solutions with MS Windows SharePoint Services 3.0 and
Visual Studio 2005 and Core Web Application Technologies with Microsoft Visual
Studio 2005.
Chris Barker—Technical Reviewer
Chris Barker is an MCT working in the New Zealand market currently employed as
a staff trainer at Auldhouse, one of New Zealand’s major CPLS training centers in
Wellington. Chris’ background includes programming from the early 1970s—his
first program was written in assembly language and debugged in binary (literally)!
While focusing training on programming (mostly using the .NET Framework) and
iv Programming in C# with Microsoft® Visual Studio® 2010
databases (mostly Microsoft SQL Server) Chris has also been an infrastructure
trainer and has Microsoft networking qualifications.
Bill Chapman – Technical Reviewer
Bill is the Principal Architect at Chapman and Associates. He helps the Microsoft
Certified Trainer Community with custom courses on how to succeed as a small
business as a Microsoft Certified Trainer. He is now in his fourteenth year as an
MCT. Before joining Microsoft in 2007 he spent 11 years specializing in developer
and database training. He has taught as both a staff instructor and as an
independent contractor throughout his career, and has taught courses all around
the world.
Manish Sharma – Open Beta Facilitator
Manish Sharma is an MCT with more than 7 Years of experience in Software
Technology Training. Apart from being MCT, MCTS, and MCP he has a Masters in
Computer Applications, gained as part of his formal education. He conducts .NET
Technology training courses on behalf of Microsoft for Microsoft Certified Partners
and other Microsoft clients. He has a vast experience in conducting developer-
centric training on various versions of the Microsoft .NET Framework, Visual
Studio, and SharePoint technologies.
Programming in C# with Microsoft® Visual Studio® 2010 v
Contents
Module 1: Introducing C# and the .NET Framework
Lesson 1: Introduction to the .NET Framework 4 1-4
Lesson 2: Creating Projects Within Visual Studio 2010 1-16
Lesson 3: Writing a C# Application 1-33
Lesson 4: Building a Graphical Application 1-44
Lesson 5: Documenting an Application 1-58
Lesson 6: Debugging Applications by Using Visual Studio 2010 1-66
Lab: Introducing C# and the .NET Framework 1-78
Module 2: Using C# Programming Constructs
Lesson 1: Declaring Variables and Assigning Values 2-4
Lesson 2: Using Expressions and Operators 2-23
Lesson 3: Creating and Using Arrays 2-36
Lesson 4: Using Decision Statements 2-49
Lesson 5: Using Iteration Statements 2-63
Lab: Using C# Programming Constructs 2-78
Module 3: Declaring and Calling Methods
Lesson 1: Defining and Invoking Methods 3-3
Lesson 2: Specifying Optional Parameters and Output Parameters 3-29
Lab: Declaring and Calling Methods 3-39
Module 4: Handling Exceptions
Lesson 1: Handling Exceptions 4-3
Lesson 2: Raising Exceptions 4-23
Lab: Handling Exceptions 4-34
vi Programming in C# with Microsoft® Visual Studio® 2010
Module 5: Reading and Writing Files
Lesson 1: Accessing the File System 5-3
Lesson 2: Reading and Writing Files by Using Streams 5-27
Lab: Reading and Writing Files 5-45
Module 6: Creating New Types
Lesson 1: Creating and Using Enumerations 6-3
Lesson 2: Creating and Using Classes 6-12
Lesson 3: Creating and Using Structures 6-33
Lesson 4: Comparing References to Values 6-41
Lab: Creating New Types 6-55
Module 7: Encapsulating Data and Methods
Lesson 1: Controlling Visibility of Type Members 7-4
Lesson 2: Sharing Methods and Data 7-15
Lab: Encapsulating Data and Methods 7-29
Module 8: Inheriting from Classes and Implementing Interfaces
Lesson 1: Using Inheritance to Define New Reference Types 8-3
Lesson 2: Defining and Implementing Interfaces 8-27
Lesson 3: Defining Abstract Classes 8-45
Lab: Inheriting from Classes and Implementing Interfaces 8-56
Module 9: Managing the Lifetime of Objects and Controlling Resources
Lesson 1: Introduction to Garbage Collection 9-4
Lesson 2: Managing Resources 9-21
Lab: Managing the Lifetime of Objects and Controlling Resources 9-35
Module 10: Encapsulating Data and Defining Overloaded Operators
Lesson 1: Creating and Using Properties 10-4
Lab A: Creating and Using Properties 10-26
Lesson 2: Creating and Using Indexers 10-38
Lab B: Creating and Using Indexers 10-50
Programming in C# with Microsoft® Visual Studio® 2010 vii
Lesson 3: Overloading Operators 10-60
Lab C: Overloading Operators 10-79
Module 11: Decoupling Methods and Handling Events
Lesson 1: Declaring and Using Delegates 11-4
Lesson 2: Using Lambda Expressions 11-14
Lesson 3: Handling Events 11-22
Lab: Decoupling Methods and Handling Events 11-38
Module 12: Using Collections and Building Generic Types
Lesson 1: Using Collections 12-4
Lab A: Using Collections 12-22
Lesson 2: Creating and Using Generic Types 12-28
Lesson 3: Defining Generic Interfaces and Understanding Variance 12-42
Lesson 4: Using Generic Methods and Delegates 12-56
Lab B: Building Generic Types 12-69
Module 13: Building and Enumerating Custom Collection Classes
Lesson 1: Implementing a Custom Collection Class 13-3
Lesson 2: Adding an Enumerator to a Custom Collection Class 13-21
Lab: Building and Enumerating Custom Collection Classes 13-37
Module 14: Using LINQ to Query Data
Lesson 1: Using the LINQ Extension Methods and Query Operators 14-3
Lesson 2: Building Dynamic LINQ Queries and Expressions 14-28
Lab: Using LINQ to Query Data 14-47
Module 15: Integrating Visual C# Code with Dynamic Languages and COM
Components
Lesson 1: Integrating Visual C# Code with Ruby and Python 15-4
Lesson 2: Accessing COM Components from Visual C# 15-19
Lab: Integrating Visual C# Code with Dynamic Languages and COM
Components 15-36
viii Programming in C# with Microsoft® Visual Studio® 2010
Appendix: Lab Answer Keys
Module 1 Lab: Introducing C# and the .NET Framework L1-1
Module 2 Lab: Using C# Programming Constructs L2-1
Module 3 Lab: Declaring and Calling Methods L3-1
Module 4 Lab: Handling Exceptions L4-1
Module 5 Lab: Reading and Writing Files L5-1
Module 6 Lab: Creating New Types L6-1
Module 7 Lab: Encapsulating Data and Methods L7-1
Module 8 Lab: Inheriting from Classes and Implementing Interfaces L8-1
Module 9 Lab: Managing the Lifetime of Objects and Controlling
Resources L9-1
Module 10 Lab A: Creating and Using Properties L10A-1
Module 10 Lab B: Creating and Using Indexers L10B-1
Module 10 Lab C: Overloading Operators L10C-1
Module 11 Lab: Decoupling Methods and Handling Events L11-1
Module 12 Lab A: Using Collections L12A-1
Module 12 Lab B: Building Generic Types L12B-1
Module 13 Lab: Building and Enumerating Custom Collection Classes L13-1
Module 14 Lab: Using LINQ to Query Data L14-1
Module 15 Lab: Integrating Visual C# Code with Dynamic Languages
and COM Components L15-1
About This Course i
About This Course
This section provides you with a brief description of the course, audience,
suggested prerequisites, and course objectives.
Course Description
This course teaches you C# language syntax, program structure, and
implementation by using Microsoft® Visual Studio® 2010 and the Microsoft .NET
Framework 4.
This course provides a solid foundation in C# to the level necessary to enable
students to attend other courses in the Technical Specialist tracks.
Audience
This course is intended for experienced developers who already have
programming experience in C, C++, Microsoft Visual Basic®, or Java and
understand the concepts of object-oriented programming.
This course is not designed for new programmers; it is targeted at professional
developers with at least 12 months experience of programming in an object-
oriented environment.
Student Prerequisites
This course requires that you meet the following prerequisites:
• C++, Java, or experience with another programming language and knowledge
of the following items:
• Creating classes
• Inheritance and abstraction
• Polymorphism
• Interfaces
• Exceptions
• Knowledge of the Visual Studio integrated development environment (IDE).
ii About This Course
Course Objectives
After completing this course, students will be able to:
• Describe the purpose of the .NET Framework, and explain how to use
Microsoft Visual C#® and Visual Studio 2010 to build .NET Framework
applications.
• Describe the syntax of basic C# programming constructs.
• Describe how to create and call methods.
• Describe how to catch, handle, and throw exceptions.
• Describe how to perform basic file I/O operations in a Visual C# application.
• Describe how to create and use new types (enumerations, classes, and
structures), and explain the differences between reference types and value
types.
• Describe how to control the visibility and lifetime of members in a type.
• Describe how to use inheritance to create new reference types.
• Describe how to manage the lifetime of objects and control the use of
resources.
• Describe how to create properties and indexers to encapsulate data, and
explain how to define operators for this data.
• Describe how to decouple an operation from the method that implements it,
and explain how to use these decoupled operations to handle asynchronous
events.
• Describe the purpose of collections, and explain how to use generics to
implement type-safe collection classes, structures, interfaces, and methods.
• Describe how to implement custom collection classes that support
enumeration.
• Describe how to query in-memory data by using Language-Integrated Query
(LINQ) queries.
• Describe how to integrate code written by using a dynamic language such as
Ruby and Python, or technologies such as Component Object Model (COM),
into a C# application.
About This Course iii
Course Outline
This section provides an outline of the course:
Module 1, "Introducing C# and the .NET Framework," provides an overview of the
.NET Framework and shows how you can start to build your own .NET
Framework applications by using C# and Visual Studio 2010.
Module 2, "Using C# Programming Constructs," provides an introduction to C#
programming language syntax and introduces many of the basic C# language data
types and programming constructs.
Module 3, "Declaring and Calling Methods," introduces the concept of methods
and describes how, in object-oriented languages such as C#, a method is a unit of
code that is designed to perform a discrete piece of work. This module shows you
how to declare and call methods by using C#.
Module 4, "Handling Exceptions," introduces the importance of exception
handling and explains why applications should be designed with exception
handling in mind. This module explains how you can implement effective
exception handling in your applications and describes how to use exceptions in
your methods to indicate an error condition to the code that calls your methods.
Module 5, "Reading and Writing Files," explains how the ability to access and
manipulate files on the file system is a common requirement for many applications.
This module shows you how to read and write to files by using the classes in the
.NET Framework. It also describes the different approaches that you can take and
explains how to read and write different formats of data.
Module 6, "Creating New Types," explains how to build your own types that model
items in the real world and describes how to implement the business logic for
these items that your applications require. This module explains the differences
between reference types and value types.
Module 7, "Encapsulating Data and Methods," describes how to use the access
modifiers that C# provides to enable you to implement encapsulation. This
module also introduces the static modifier, which enables you to define members
that can be shared over multiple instances of the same type.
Module 8, "Inheriting from Classes and Implementing Interfaces," explains that
inheritance is a key concept in an object-oriented language and describes how you
can use inheritance, interfaces, and abstract classes to develop object hierarchies.
This module also explains how you can use these object hierarchies to help reduce
bugs by defining clear contracts for the functionality that a class should expose
and providing default implementations where you can sensibly abstract code into a
base type.
iv About This Course
Module 9, "Managing the Lifetime of Objects and Controlling Resources,"
introduces the concept of resource management and discusses its importance. This
module explains how the .NET Framework simplifies resource management by
automatically reclaiming the resources for a managed object when an application
no longer references it. This module also explains that the garbage collector does
not control unmanaged resources and describes the steps that you can take to
dispose of such resources.
Module 10, "Encapsulating Data and Defining Overloaded Operators," introduces
properties and indexers. These are elements of C# that enable you to encapsulate
data and expose data appropriately and efficiently. This module also describes how
to implement operators for your types by using overloading.
Module 11, "Decoupling Methods and Handling Events," explains how to
decouple an operation from the method that implements it and describes how to
use anonymous methods to implement decoupled operations. This module also
explains how to use events to inform consuming applications of a change or
notable occurrence in a type.
Module 12, "Using Collections and Building Generic Types," introduces the
concept of collection classes and explains that you can use them with greater
flexibility than a simple array. This module also introduces generics and explains
how to use generic classes to maintain type integrity and avoid the issues that are
associated with a lack of type safety.
Module 13, "Building and Enumerating Custom Collection Classes," explains how
to use the collection classes that the .NET Framework base class library includes.
This module also describes how to build custom collection classes.
Module 14, "Using LINQ to Query Data," explains how you can use LINQ to
abstract the mechanism that an application uses to query data from the application
code. This module describes built-in C# LINQ extension methods and LINQ query
operators. This module also describes how to build LINQ queries dynamically by
using expression trees.
Module 15, "Integrating Visual C# Code with Dynamic Languages and COM
Components," explains how the .NET Framework 4 enables you to invoke code
and components that were written by using other languages from your C# code. It
describes how the dynamic language runtime (DLR) enables you to reuse code
built by using a wide range of scripting languages, such as Ruby and Python. This
module also describes how to invoke COM components from a C# application.
About This Course v
Course Materials
The following materials are included with your kit:
• Course Handbook. A succinct classroom learning guide that provides all the
critical technical information in a crisp, tightly-focused format, which is just
right for an effective in-class learning experience.
• Lessons: Guide you through the learning objectives and provide the key
points that are critical to the success of the in-class learning experience.
• Labs: Provide a real-world, hands-on platform for you to apply the
knowledge and skills learned in the module.
• Module Reviews and Takeaways: Provide improved on-the-job reference
material to boost knowledge and skills retention.
• Lab Answer Keys: Provide step-by-step lab solution guidance at your finger
tips when it’s needed.
• Course Companion CD. Searchable, easy-to-navigate digital content with
integrated premium on-line resources designed to supplement the Course
Handbook.
• Labs: Include complete lab exercise information and answer keys in digital
form to use during lab time.
• Resources: Include well-categorized additional resources that give you
immediate access to the most up-to-date premium content on TechNet,
MSDN®, Microsoft Press®.
• Student Course Files: Include the Allfiles.exe, a self-extracting executable
file that contains all the files required for the labs and demonstrations.
Note: To access the full course content, insert the Course Companion CD into the CD-
ROM drive, and then in the root directory of the CD, double-click StartCD.exe.
• Course evaluation. At the end of the course, you will have the opportunity to
complete an online evaluation to provide feedback on the course, training
facility, and instructor.
To provide additional comments or feedback on the course, send e-mail to
support@mscourseware.com. To inquire about the Microsoft Certification
Program, send e-mail to mcphelp@microsoft.com.
vi About This Course
Virtual Machine Environment
This section provides the information for setting up the classroom environment to
support the business scenario of the course.
Virtual Machine Configuration
In this course, you will use Windows Server® 2008 with Hyper-V™ to perform the
labs.
The following table shows the role of each virtual machine used in this course.
Virtual machine Role
10266A-GEN-DEV Windows 7 Client
Software Configuration
The following software is installed on each VM:
• Visual Studio 2010 Professional Edition
• IronRuby
• IronPython
• SandCastle
• HTML Help Workshop
• The 2007 Microsoft Office system
Course Files
There are files associated with the labs in this course. The lab files are located in
the folder E:Labfiles on the student computers.
Classroom Setup
Each classroom computer will have the same virtual machine configured in the
same way.
Course Hardware Level
To ensure a satisfactory student experience, Microsoft Learning requires a
minimum equipment configuration for trainer and student computers in all
About This Course vii
Microsoft Certified Partner for Learning Solutions (CPLS) classrooms in which
Official Microsoft Learning Product courseware are taught.
This course requires that you have a computer that meets or exceeds hardware
level 6, which prescribes the following:
• Intel Virtualization Technology (Intel VT) or AMD Virtualization (AMD-V)
processor
• Dual 120-GB hard disks, 7,200 RM SATA or better (configured as a stripe
array)
• 4 gigabytes (GB) of RAM expandable to 8 GB or higher
• DVD drive
• Network adapter
• Super VGA (SVGA) 17-inch monitor
• Microsoft Mouse or compatible pointing device
• Sound card with amplified speakers
In addition, the instructor computer must be connected to a projection display
device that supports SVGA 1024 × 768 pixels, 16-bit colors.
Introducing C# and the .NET Framework 1-1
Module 1
Introducing C# and the .NET Framework
Contents:
Lesson 1: Introduction to the .NET Framework 4 1-4
Lesson 2: Creating Projects Within Visual Studio 2010 1-16
Lesson 3: Writing a C# Application 1-33
Lesson 4: Building a Graphical Application 1-44
Lesson 5: Documenting an Application 1-58
Lesson 6: Debugging Applications by Using Visual Studio 2010 1-66
Lab: Introducing C# and the .NET Framework 1-78
1-2 Programming in C# with Microsoft® .Visual Studio® 2010
Module Overview
Microsoft® Visual Studio® 2010 and the Microsoft .NET Framework 4 provide a
comprehensive development platform to enable you to build, debug, deploy, and
manage applications.
This module describes the purpose of the .NET Framework 4, and how to build
applications by using Visual Studio 2010.
Objectives
After completing this module, you will be able to:
• Explain the purpose of the .NET Framework 4.
• Create Microsoft Visual C#® projects by using Visual Studio 2010.
• Explain the structure of a Visual C# application.
• Use the Windows® Presentation Foundation (WPF) Application template to
build a simple graphical application.
Introducing C# and the .NET Framework 1-3
• Use XML comments to document an application.
• Use the debugger to step through a program.
1-4 Programming in C# with Microsoft® .Visual Studio® 2010
Lesson 1
Introduction to the .NET Framework 4
This lesson introduces the .NET Framework 4, and describes the key concepts of
.NET and some of the tools that are provided to help simplify development.
Objectives
After completing this lesson, you will be able to:
• Describe the purpose of the .NET Framework 4.
• Describe the role of Visual C# for writing the code for .NET Framework 4
applications.
• Describe the purpose of an assembly.
• Explain how the common language runtime (CLR) compiles and runs
assemblies.
• Describe the tools that the .NET Framework 4 provides.
Introducing C# and the .NET Framework 1-5
What Is the .NET Framework 4?
Key Points
The .NET Framework 4 provides a comprehensive development platform that
offers a fast and efficient way to build applications and services. Using Visual
Studio 2010, developers can utilize the .NET Framework 4 to create a wide range
of solutions that operate across a broad range of computing devices.
The .NET Framework 4 provides three principal elements: the CLR, the .NET
Framework class library, and a collection of development frameworks.
The Common Language Runtime
The .NET Framework 4 provides an environment called the CLR. The CLR
manages the execution of code and simplifies the development process by
providing a robust and secure execution environment that provides common
services such as memory management, transactions, interprocess communications,
multithreading, and many other features.
1-6 Programming in C# with Microsoft® .Visual Studio® 2010
The .NET Framework Class Library
The .NET Framework 4 provides a library of reusable classes that developers can
use to build applications. The classes provide a foundation of common
functionality and constructs that help simplify application development and
remove the requirement for developers to constantly reinvent logic. For example,
the System.IO.File class contains functionality that enables developers to
manipulate files on the Windows file system. In addition to using the classes in the
.NET Framework class library, you can extend these classes by creating your own
libraries of classes.
Development Frameworks
The .NET Framework 4 provides several development frameworks that you can
use to build common types of applications. These frameworks provide the
necessary components and infrastructure to get you started. The development
frameworks include:
• ASP.NET. Enables you to build server-side Web applications.
• WPF. Enables you to build rich client applications.
• Windows Communication Foundation (WCF). Enables you to build secure and
reliable service-oriented applications.
• Windows Workflow Foundation (WF). Enables you to build workflow solutions
to fulfill the complex business requirements of modern organizations.
Question: What is the purpose of the .NET Framework 4, and the three main
components that it provides?
Additional Reading
For more information about the .NET Framework, see the Microsoft .NET page at
http://go.microsoft.com/fwlink/?LinkId=192876.
Introducing C# and the .NET Framework 1-7
The Purpose of Visual C#
Key Points
The CLR runs executable code that is generated by using a compiler. You can build
applications for the .NET Framework by using any language that has a compiler
that can generate executable code in the format that the CLR recognizes. Visual
Studio 2010 provides compilers for C++, Visual Basic, F#, and C#. Compilers for
other languages are available from a variety of third-party vendors.
C# is the language of choice for many developers. It uses a syntax that is very
similar to C, C++, and Java, and has several extensions and features that are
designed for operation with the .NET Framework. Because of its heritage, many
developers who are familiar with other programming languages find C# easy to
learn and can be productive very quickly.
The C# language has been standardized and is described by the ECMA-334 C#
Language Specification. Several vendors apart from Microsoft produce C#
compilers. The Microsoft implementation is called Visual C#, and is integrated into
Visual Studio. Visual Studio supports Visual C# with a full-featured code editor,
compiler, project templates, designers, code wizards, a powerful and easy-to-use
debugger, and other tools. C# is also available from Microsoft as Visual C# Express
1-8 Programming in C# with Microsoft® .Visual Studio® 2010
Edition, which provides a subset of the features that are provided with Visual
Studio.
Note: C# is an evolving language. Visual C# 2010 uses C# 4.0, which contains several
extensions to the C# language that are not yet part of the ECMA standard.
Question: Which programming languages have you used?
Additional Reading
For more information about the Microsoft implementation of Visual C# 2010, see
the Visual C# page http://go.microsoft.com/fwlink/?LinkId=192877.
For more information about the new features of C# 4.0, see the What's New in
Visual C# 2010 page at http://go.microsoft.com/fwlink/?LinkId=192878.
Introducing C# and the .NET Framework 1-9
What Is an Assembly?
Key Points
When you compile a Visual C# application by using Visual Studio 2010, the
compiler generates an executable file that the CLR can run. This file is called an
assembly. An assembly contains code in an intermediate format called Microsoft
intermediate language (MSIL). All compilers for the .NET Framework generate
code in this format, regardless of the programming language that was used to write
an application. This enables the CLR to run code in the same way, regardless of the
language that the developer used.
Assemblies are the building blocks of .NET Framework applications; they form the
fundamental unit of deployment, version control, reuse, and security.
You can think of an assembly as a collection of types and resources that work
together and form a logical unit of functionality. An assembly provides the CLR
with the information that it needs to be aware of type implementations.
An assembly can be of two types: an executable program, or a library that contains
executable code that other programs can reuse. By using a library, developers can
modularize the development of their applications into logical components.
1-10 Programming in C# with Microsoft® .Visual Studio® 2010
Typically, when you are distributing assemblies to customers as part of your
application, you will want to ensure that the assembly contains versioning
information, and that the assembly is signed.
Versioning your assemblies is important because ultimately, any applications that
you build will have multiple releases. Versioning information can help you identify
which versions customers already have and enable you to perform the necessary
steps to upgrade the application. Similarly versioning information can also help
when documenting and fixing bugs.
Signing your assemblies is equally important because it ensures that your assembly
cannot easily be modified or replaced by an alternative implementation from a
malicious source, and because it gives the assembly a strong name.
Information such as the assembly version and security identity is stored as
metadata in an assembly manifest. The manifest also contains metadata that
describes the scope of the assembly, and any references to classes and resources.
The manifest is typically stored in a portable executable (PE) file.
Assembly Versioning
Assembly version information is stored in the assembly manifest and is used with
the assembly name and culture to derive the assembly’s identity. An assembly
version number consists of the following:
• Major version number
• Minor version number
• Build number
• Revision number
Assembly Signing
Assembly signing is an important step that developers should include in their build
process because it provides the following benefits:
• It protects assemblies from modification.
• It enables you to include the signed assembly in the Global Assembly Cache
(GAC), so you can share the assembly with multiple applications.
• It guarantees that the name of the assembly is unique.
• To sign your assembly, you can use the Sign Tool that is provided with the
.NET Framework, or you can use the assembly-signing functionality in Visual
Studio 2010.
Introducing C# and the .NET Framework 1-11
Question: Why would you choose to distribute an assembly rather than distribute
the source code?
Additional Reading
For more information about the purpose and features of assemblies, see the
Assemblies in the Common Language Runtime page at
http://go.microsoft.com/fwlink/?LinkId=192879.
For more information about assembly versioning, see the Assembly Versioning
page at http://go.microsoft.com/fwlink/?LinkId=192880.
For more information about assembly signing, see the SignTool.exe (Sign Tool)
page at http://go.microsoft.com/fwlink/?LinkId=192881.
1-12 Programming in C# with Microsoft® .Visual Studio® 2010
How the Common Language Runtime Loads, Compiles, and
Runs Assemblies
Key Points
Assemblies contain MSIL code, which is not executable. When you run a .NET
Framework application, the CLR loads the MSIL code from an assembly and
converts it into the machine code that the computer requires.
The CLR is a fundamental component of the .NET Framework. It handles code
execution and provides useful services for application development. The CLR
contains several components that perform the following tasks when you run a
.NET Framework application:
1. The Class Loader locates and loads all assemblies that the application requires.
The assemblies will already be compiled into MSIL.
2. The MSIL-to-native compiler verifies the MSIL code and then compiles all
assemblies into machine code ready for execution.
Introducing C# and the .NET Framework 1-13
Note: The CLR performs the verification step because it is possible to write your own
MSIL code. If you use a C# compiler, the MSIL code will be valid, but the CLR cannot
make any assumptions.
3. The Code Manager loads the executable assembly and runs the Main method.
4. The Garbage Collector provides automatic lifetime memory management of all
objects that your application creates. The Garbage Collector disposes of any
objects that your application is no longer using.
5. The Exception Manager provides structured exception handling for .NET
applications, which is integrated with Windows structured exception
handling.
Question: What steps does the CLR perform when you run your application?
1-14 Programming in C# with Microsoft® .Visual Studio® 2010
What Tools Does the .NET Framework Provide?
Key Points
The .NET Framework provides several tools to help simplify the development of
.NET applications. The following table describes some of the key tools.
Tool Description
Code Access Security Policy
Tool (Caspol.exe)
Enables users to modify the machine, user, and
enterprise security policy. This can include defining
a custom permission set and adding assemblies to
the full trust list.
Certificate Creation Tool
(Makecert.exe)
Enables users to create x.509 certificates for use in
their development environment. Typically, you can
use these certificates to sign your assemblies and
define Secure Sockets Layer (SSL) connections.
Global Assembly Cache Tool
(Gacutil.exe)
Enables users to manipulate the assemblies in the
GAC. This can include installing and uninstalling
assemblies in the GAC so that multiple applications
can access them.
Introducing C# and the .NET Framework 1-15
Tool Description
Native Image Generator
(Ngen.exe)
Enables users to improve the performance of .NET
applications. The Native Image Generator improves
performance by precompiling assemblies into
images that contain processor-specific machine
code. The CLR can then run the precompiled
images instead of using just-in-time (JIT)
compilation. Alternatively, if you use JIT
compilation, your code is compiled just before it is
executed.
MSIL Disassembler (Ildasm.exe) Enables users to manipulate assemblies, such as
determining whether an assembly is managed, or
disassembling an assembly to view the compiled
MSIL code.
Strong Name Tool (Sn.exe) Enables users to sign assemblies with strong names.
The Strong Name Tool includes commands to
create a new key pair, extract a public key from a
key pair, and verify assemblies.
Question: You have created two applications that both use an assembly called
Contoso.ReportGenerator.dll. Both applications will run on the same machine.
What is the best approach to share the Contoso.ReportGenerator.dll assembly
and which tool would you use?
Additional Reading
For more information about the tools that the .NET Framework provides, see the
.NET Framework Tools page at http://go.microsoft.com/fwlink/?LinkId=192882.
1-16 Programming in C# with Microsoft® .Visual Studio® 2010
Lesson 2
Creating Projects Within Visual Studio 2010
This lesson introduces you to Visual Studio 2010 and describes how it can help
simplify the development of .NET applications through the use of predefined
application templates, and features of the integrated development environment
(IDE).
Objectives
After completing this lesson, you will be able to:
• Describe the features that are available in Visual Studio 2010 that aid
programming productivity.
• Describe the various project types that Visual Studio 2010 supports and when
to use them.
• Describe the primary files that are found in most Visual Studio solutions.
Introducing C# and the .NET Framework 1-17
• Explain how to create a console application by using the Console Application
template in Visual Studio 2010.
• Use Visual Studio to compile and run an application.
1-18 Programming in C# with Microsoft® .Visual Studio® 2010
Key Features of Visual Studio 2010
Key Points
Visual Studio 2010 presents a single development environment that enables you to
rapidly design, implement, build, test, and deploy various types of applications and
components by using a range of programming languages.
Some of the key features of Visual Studio 2010 are:
• Intuitive integrated development environment. The Visual Studio 2010 IDE
provides all of the features and tools that are necessary to design, implement,
build, test, and deploy applications and components.
• Rapid application development. Visual Studio 2010 provides design views for
graphical components that enable you to build complex user interfaces easily.
Alternatively, you can use the Code Editor views, which provide more control.
Visual Studio 2010 also provides wizards that help speed up the development
of particular components.
Introducing C# and the .NET Framework 1-19
• Server and data access. Visual Studio 2010 provides the Server Explorer, which
enables you to log on to servers and explore their databases and system
services. It provides a familiar way to create, access, and modify databases that
your application uses.
• Debugging features. Visual Studio 2010 provides a debugger, which enables you
to step through local or remote code, pause at breakpoints, and follow
execution paths.
• Error handling. Visual Studio 2010 provides the Error List window, which
displays any errors, warnings, or messages that are produced as you edit and
build your code.
• Help and documentation. Visual Studio 2010 also provides help and guidance
through Microsoft IntelliSense®, code snippets, and the integrated help system,
which contains documentation and samples.
Question: What are the main reasons why you may choose Visual Studio 2010
over a text editor such as Notepad++?
1-20 Programming in C# with Microsoft® .Visual Studio® 2010
Templates in Visual Studio 2010
Key Points
Visual Studio 2010 supports the development of different types of applications
such as Windows-based client applications, Web-based applications, services, and
libraries. To help you get started, Visual Studio 2010 provides several application
templates that provide a structure for the different types of applications. These
templates:
• Provide starter code that you can build on to quickly create a functioning
application.
• Include supporting components and controls that are relevant to the project
type.
• Configure the Visual Studio 2010 IDE to the type of application that you are
developing.
• Add references to any initial assemblies that this type of application usually
requires.
Introducing C# and the .NET Framework 1-21
Types of Templates
The following table describes some of the common application templates that you
can use when you develop .NET Framework applications by using Visual Studio
2010.
Template Description
Console Application Provides the environment settings, tools, project
references, and starter code to develop an application
that runs in a command-line interface. This type of
application is considered lightweight compared to the
Windows Forms application template because there is
no graphical user interface.
WPF Application Provides the environment settings, tools, project
references, and starter code to build a rich graphical
Windows application. A WPF application enables you
to create the next generation of Windows applications,
with much more control over user interface design.
Class Library Provides the environment settings, tools, and starter
code to build a .dll assembly. You can use this type of
file to store functionality that you might want to invoke
from many other applications.
Windows Forms Application Provides the environment settings, tools, project
references, and starter code to build a graphical
Windows Forms application.
ASP.NET Web Application Provides the environment settings, tools, project
references, and starter code to create a server-side,
compiled ASP.NET Web application.
ASP.NET MVC 2 Application Provides the environment settings, tools, project
references, and starter code to create a Model-View-
Controller (MVC) Web application. An ASP.NET MVC
Web application differs from the standard ASP.NET
Web application in that the application architecture
helps you separate the presentation layer, business
logic layer, and data access layer.
Silverlight Application Provides the environment settings, tools, project
references, and starter code to build a rich, graphical
Web application.
1-22 Programming in C# with Microsoft® .Visual Studio® 2010
Template Description
WCF Service Application Provides the environment settings, tools, project
references, and starter code to build Service Orientated
Architecture (SOA) services.
Question: What project templates would you use for each of the following:
• A client application that will run on a Windows-based computer.
• A library of functionality that you want to use in other applications.
• A Web site that you will host on an Internet Information Services (IIS) Web
server.
Introducing C# and the .NET Framework 1-23
The Structure of Visual Studio Projects and Solutions
Key Points
Visual Studio 2010 uses solutions and projects as conceptual containers to
organize your source files during development. Categorizing your source files in
this way simplifies the build and deployment process for your .NET Framework
applications.
Visual Studio Projects
A project is used to organize source files, references, and project-level configuration
settings that make up a single .NET Framework application or library. When you
create a project in Visual Studio, the project is automatically organized into a
solution.
The following table describes some of the common file types that you will find in a
Visual Studio project.
1-24 Programming in C# with Microsoft® .Visual Studio® 2010
File Description
.cs Code files that can belong to a single project solution. This type of file
can represent any of the following:
• Modules
• Windows Forms files
• Class files
.csproj Project files that can belong to multiple project solutions. The .csproj
file also stores settings for the project, such as the output path for the
build output and the target platform.
.aspx Files that represent ASP.NET Web pages. An ASP.NET file can contain
your Visual C# code or you can use an accompanying .aspx.cs file to
store your code in addition to the page markup.
.config Configuration files are XML-based files that you can use to store
application-level settings such as database connection strings, which
you can then modify without recompiling your application.
.xaml XAML files are used in WPF and Microsoft Silverlight® applications to
define user interface elements.
Visual Studio Solutions
A single Visual Studio solution is a container for one or more projects. By default,
when you create a new project, Visual Studio automatically creates a solution for
the project. You can add additional projects to a solution. This is useful if, for
example, you are building a library assembly and an application that tests this
library. You can build and compile both projects as part of the same solution rather
than having to run multiple instances of Visual Studio.
A solution can also contain project-independent items that any of the projects in
the solution can use. For example, an ASP.NET solution can contain a single
cascading style sheet (.css) file that applies a standard look and feel to any of the
included ASP.NET projects.
Categorizing multiple projects into a single Visual Studio solution provides the
following advantages:
• It enables you to work on multiple projects within a single Visual Studio 2010
session.
• It enables you to apply configuration settings globally to multiple projects.
Other documents randomly have
different content
[I-68] Frontenac to Red Wing, some 13 miles by
present channel, whence it is a couple of miles further
to the head of the island opp. Cannon r. camp. Pike
coasts the Minnesota shore till he finishes with the
lake at the mouth of Bullard's or Ida cr., a streamlet
that makes in at a town called after the chief Wakouta,
Wacouta, Wakuta, etc. Here he enters one of the
channels by which the Mississippi finds its way into the
lake, no doubt the middle one, then as now the main
one, which, however, soon joins the south one; the
north channel is narrower, crookeder, shoaler, and
connected with some expansions known as Upper and
Lower lakes and Goose bay. The town of Red Wing is
situated on the S. side of a sharp bend the river makes
in coming from the Cannon, on a plain under bluffs
that nearly encompass the town; one of these is
specially notable as the isolated elevation forming a
conspicuous landmark on the very brink of the river.
This is Barn bluff, or Barn mountain, so named by tr. of
F. La Grange; it is ¾ of a mile long and 345 feet above
low water mark; "upon the highest point of the
Grange. Major Long, who ascended it in 1817,
observed an artificial mound, whose elevation above
its base was about five feet," Keating, I. p. 296.
Nicollet made the altitude 322 feet, with commendable
caution; Owen gave 350 feet, almost correctly. This
word Grange is often found as Gange: thus Beltrami
has in text, p. 189, mountain of the Gange, and Gange
r.; latter also on map, and I suppose Ganges r. could
be found, even at this distance from India. About the
mouth of Cannon r., opp. Pike's camp, there was a
place called Remnichah; both Nicollet and Owen chart
Remnicha r. or cr. as a stream falling in close to the
mouth. While Remnicha or Hhemnicha was a name of
Red Wing's village, it also covered the whole tract from
Barn bluff to Cannon r. Mr. A. J. Hill informs me of "a
small ravine or coulée which ran through Red Wing's
village, and in 1854, when I lived there, was called the
Jordan. It only headed a few blocks back, and is now
doubtless a sewer or filled up." So Nicollet's Remnicha
r. is that now known as Hay cr., above which a certain
Spring cr. makes in on the same side. Present town of
Trenton, Pierce Co., Wis., is about a mile above camp.
[I-69] Discovery of the St. Croix r. is commonly
attributed to Accault's party, already mentioned as
consisting of himself, Auguelle, and Hennepin,
prisoners in the hands of the Sioux at the time. The
date is 1680; day in question. According to La Salle's
letter of Aug. 22d, 1682, written at Fort Frontenac, in
Margry's Relations, II. p. 245 seq., it was very shortly
after the 22d of April, 1680, when the Indians who
were carrying them off had come up the Mississippi to
8 leagues below the falls of St. Anthony, and then
determined to finish their journey by land to their
village at Mille Lacs. As the St. Croix is more than 24
m. below Minneapolis, this party must have passed its
mouth about the date said. The Memoir of Le Sieur
Daniel Greysolon Du Luth to the Marquis of Seignelay,
1685 (Archives of the Ministry of the Marine), states
that in June, 1680, he entered a river 8 leagues from
the end of Lake Superior, ascended it, made a half
league portage, and fell into "a very fine river," which
took him to the Mississippi r. This was the St. Croix,
which Du Luth thus certainly descended to its mouth
at that time. He heard of the captivity of his
countrymen with indignation and surprise, hired a
Sioux to show him where they were, and rescued
them; he says that he put them in his canoes and
carried them to Michelimakinak, whence, after
wintering there, they set out for the settlements Mar.
29th, 1681. It is quite possible that before the great
triangular duel which La Salle, Du Luth, and Hennepin
managed to arrange among themselves over the
operations of 1680, the St. Croix was seen by the
missionary Menard, who in 1661 may have reached
the Mississippi by way of the St. Croix or some other
way, and was soon after lost. Marquette is not in
question here, as he came by the Wisconsin to the
Mississippi and went down the latter. So with any other
person who reached the Mississippi prior to 1680.
Excepting the Menard matter, which is uncertain, the
case narrows to Accault's party and Du Luth, within
some weeks of each other, late spring and early
summer of 1680; the facts appear to be that the
former first passed the mouth of the St. Croix, and the
latter first descended this river. Hennepin first named
the river R. de Tombeau, Descr. Louis., 1683, map; this
is translated Tomb r., as, e. g., Shea's Hennepin, 1880,
p. 199, where we read: "Forty leagues above
[Chippewa r.] is a river full of rapids, by which, striking
northwest [read N. E.], you can proceed to Lake
Condé [L. Superior], as far as Nimissakouat [in Margry
Nemitsakouat, in the Nouv. Déc. Nissipikouet, being
the Bois Brûlé] river, which empties into that lake. This
first river is called Tomb river because the Issati
[Sioux] left there the body of one of their warriors,
killed by a rattlesnake, on whom, according to their
custom, I put a blanket." Some translate Grave r. On
Franquelin's map, 1688, the St. Croix is lettered R. de
la Magdelaine, though a certain Fort St. Croix appears
about its head; by whom it was first called Magdalene
r. I am not informed. Lahontan's map shows nothing
here; he was too full of his fabulous Long r. to concern
himself much with real rivers. Next come Lesueur and
his people, 1695; he had first reached the Mississippi
in 1683, and on this his second appearance (his third
being in 1700) they built the trading-house called Fort
Lesueur on Pelée isl., just below the mouth of the St.
Croix, as already noted. His editor, so far as this trip is
concerned, is the clever carpenter Penicaut, a sensible,
fair-and-square man. Just here comes in the question
of the first application of the name St. Croix. The river
was already so called and the name in use before
1700; thus, Nicolas Perrot's prise de possession, a
document dated at Fort St. Antoine, May 8, 1689,
mentions the Rivière-Sainte-Croix. The Carte du
Canada ou de la Nouvelle France, par Guillame de
L'Isle, Paris, 1703, traces the river and letters it "L. &
R. Ste. Croix," i. e., as some have translated it, Lake
and River Holy Cross; said lake being, of course, the
dilation of the same bottle-nosed river, which issues
from a contracted orifice, but is a mile or two wide
higher up. But whatever the theological proclivity to
suppose this name to have been given for the usual
instrument of the execution of Roman malefactors,
later put by the Emperor Constantine on his banner,
and afterward used for other purposes, it is certain
that the Christian crucifix is not directly implied in the
name. It is a personal designation, connoting one
Sainte Croix or Saint Croix, a trader named in La
Harpe's MSS. of Lesueur's third voyage as a
Frenchman who had been wrecked there; for we read:
"September 16 he [Lesueur] passed on the east a
large river called Sainte-Croix, because a Frenchman
of that name was shipwrecked at its mouth." Hennepin
names Sainte Croix as one of six men who deserted La
Salle. A letter written in June, 1684, by Du Luth to
Governor De la Barre (who succeeded Frontenac in
1682), states that the writer had met one Sieur de la
Croix and his two companions. This case resembles
those of La Crosse r. already noted, and St. Pierre r.,
noted beyond. It may be summed in the statement
that St. Croix r., St. Pierre r., and Lake Pepin, were all
three so named for persons, by Lesueur or his
companions, not earlier than 1683 and not later than
1695; best assignable date, 1689. The river has also
been called Hohang or Fish r. (cf. Sioux Hogan-wanke-
kin). The character of St. Croix's r. as a waterway to
the Great Lakes is elsewhere discussed. This stream
now forms the boundary between Wisconsin and
Minnesota from its mouth to beyond 46° N., where it
splits up into small streams in Burnett Co., Wis. Its
general course is not far from S.—it is due S. for many
miles before it falls into the Mississippi; which latter,
for a great distance above their confluence, has a
general bearing S. E. Immediately at the mouth of the
St. Croix, on the E., is Prescott, Pierce Co., Wis., the
site of which was once recommended by Long for a
military post; on the W. is Point Douglas, Washington
Co., Minn.; and across the Mississippi, a very little
higher up, is Hastings, seat of Dakota Co., Minn., at
the mouth of Vermilion r. The above-mentioned
dilation of the river into Lake St. Croix extends some
30 m. up from its mouth; and as far above this lake as
an Indian ordinarily paddled his canoe in a day was
the long-noted Sioux-Chippewa boundary, at a place
which became known as Standing Cedars. Thus the
river did duty in Indian politics before it set bounds to
our Minnesota and Wisconsin. This lake was often
called Lower St. Croix l., in distinction from the sizable
body of water at the head of the river known as Upper
St. Croix l. For the route thence by Burnt r. to Lake
Superior, see a note beyond.
[I-70] Especially as it leaves us in the lurch for mileage
of the 19th. But we can easily overhaul him before he
gets to St. Paul, which is only 30 river-miles from
Prescott (mouth of St. Croix r.). He did not go far
above this river; for he makes it 26½ + 8 = 34½ m.
to the Sioux village, which latter was close to the
present city limits of St. Paul. If we must set a camp
for him, it may be assigned to Hastings, Dakota Co.,
Minn., 2½ m. above Prescott, Pierce Co., Wis., and
18½ m. below Newport, Washington Co., Minn., in the
vicinity of which he will camp to-morrow. "Tattoo," at
which the blunderbuss was fired, is not a place, as the
context and capitalization might suggest, but a certain
military call which is habitually sounded in garrisons
and camps in the evening before taps. It marks the
hour when the soldiers are supposed to retire to their
quarters for their devotions before the lights are put
out at taps, and when the officers settle down in
earnest for the night's poker. In approaching the St.
Croix from his camp opposite Cannon r., Pike has bluffs
off his right nearly all the way, and the town of
Diamond Bluff, Pierce Co., Wis., is at the point where
they first reach to the river, a mile and a half above
the mouth of Trimbelle r., right, and 11 m. below
Prescott. On the left the bluffs are off the river all the
way, and for most of this distance Vermilion slough,
running under the bluffs, cuts off an island 11 m. long
and at its widest near 3 m. broad. The lower outlet of
the slough is below Trimbelle r.; the middle opening is
only 3 m. below Prescott; the upper one is at Hastings.
The bottom-land of the principal island has several
bodies of water, one of them called Sturgeon l.,
discharging separately from the main slough; and is
traversed lengthwise by a sand-bank 6 m. long, which
may be called Lesueur's Terrace. For this Prairie or
Bald isl. is no doubt that formerly known as Isle Pelée,
on which was built Fort Lesueur, 1695. The middle
opening of Vermilion slough is in common with a lower
outlet of Vermilion r. This is Rapid r. of Long, and
Rivière Jaune of the French; "R. Jaune" appears on
Franquelin's map, 1688. The upper discharge of this
river is at Hastings, and thus above the mouth of the
St. Croix; Lake Isabel is a small sheet between the
river and the town. The Minnesota county line
between Goodhue and Dakota strikes the Mississippi
just 1¼ m. below the lower mouth of Vermilion r. At
the mouth of the St. Croix the Mississippi ceases or
rather begins to separate Wisconsin from Minnesota;
so that henceforth Pike proceeds in the latter State.
[I-71] Hastings to Newport, 18½ m. by the channel;
camp a mile and a half beyond this, vicinity of present
Red Rock, Washington Co., at the point on the small
strip of prairie where the Sioux had their celebrated
red medicine-stone; this was the "large painted stone"
Pike observed. It gave name to Red Rock, having
meanwhile become a historical object. We read in
Long, I. p. 287: "a stone which is held in high
veneration by the Indians on account of the red
pigment with which it is bedawbed, it is generally
called the painted stone.... It is a fragment of syenite,
which is about four and a half feet in diameter.... The
Indians frequently offer presents to the Great Spirit
near this stone," etc. The party found near the stone
an eagle's feather, roots of Psoralea esculenta, and
willow sticks painted red; they secured a fragment of
the idol for their mineralogical collection. At the time of
this visit (1823) there was an Indian burying-ground a
short distance above—in sight from the spot—if that
place can be called a burying-ground where the bodies
are not buried in the ground but scaffolded in the air;
a mode of disposition of the dead which might be
called hypsitaphy, in distinction from bathytaphy or
ordinary underground interment. See Pike's remarks
on Sioux burial on the 21st. To reach the sacred spot,
hallowed by association with the deepest religious
emotions of the untutored aboriginal mind, Pike left
Hastings, where the river was bridged by the C., M.
and St. P. R. R. in 1871 (Act of Minn. Legisl., Feb. 7th,
1867), and soon passed the site of Nininger, Dakota
Co., a small town built at the lower point of a steep
bluff which fronts the river's edge on the S., at the
mouth of the rivulet which serves as the upper
discharge of Lake Rebecca or King l.—in fact the whole
bottom on his left is an island 2¾ m. long, extending
from Hastings to Nininger, being cut off by the slough
of which King l. is a dilation. On the right, in
Washington Co., bluffs front the river for a mile or
more, to the lower opening of Boulanger slough, which
cuts off an island 2½ m. long. The immediate frontage
of the Nininger bluffs on the river is less than a mile,
for they recede at the lower opening of Nininger
slough. The river thus winds from side to side of its
bed, with alternation of bluffs and bottom on each
side. Above Nininger slough the river makes a great
loop to the left; the whole irregular curve is subtended
on the right by Grey Cloud slough, about 4 m. long
direct, and longer by its meanders, thus cutting off
Grey Cloud isl., of the same length, and over 2 m.
wide in some places; town site Grey Cloud,
Washington Co., on the river bank on this island, which
also presents at its northern end a limestone rock, 50
to 75 feet above low-water mark, and a mile or more
long; this is probably the Medicine Wood of Forsyth,
1819. Near the middle of the loop, on the other side, is
the nominis umbra site of Pine Bend, Dakota Co.,
where the river runs under the hills. This loop was
formerly called Détour de Pin or des Pins, whence its
modern names Pine bend and Pine turn. The hills
border the river pretty closely for 5 m. further, to
Merrimac, opposite which is an island of the same
name; within 1½ m. of this on the right hand,
opposite an island of its own name, is Newport,
Washington Co.
[I-72] Newport to St. Paul—to a steamboat ldg. about
the foot of Wabasha or Robert st.—is 8½ m. by the
channel, and considerably more than halfway up to
Pike's camp on the island at the mouth of St. Peter's or
the Minnesota r. Thus, though Pike calls to-day's
voyage "24 miles," it is nearer 14. One who then
swept around the bold bend of the river at St. Paul
saw a germ of that great metropolis in the humble
Sioux village, though only prescience could have
divined what time would make of the site above it. A
later account than Pike's is given in Keating's Long's
Exp. of 1823, pub. 1824, I. p. 289: "Passed an Indian
village consisting of ten or twelve huts, situated at a
handsome turn on the river, about 10 miles below the
mouth of the St. Peter; the village is generally known
by the name of the Petit Corbeau, or Little Raven,
which was the appellation of the father and
grandfather of the present chief. He is called
Chetanwakoamene (the good sparrow-hunter). The
Indians designate this band by the name of Kapoja,
which implies that they are deemed lighter and more
active than the rest of the nation." This was a band of
Mdewakantonwan Sioux (the Minowa Kantong of Pike),
for which, as well as for the celebrated chief himself,
see notes beyond. The term which Keating renders
Kapoja is now Kaposia, as a designation of the locality
of South Park, a place on the west bank of the river;
but the old Sioux village was on the east bank, below
Frenchman's bar, in the low ground formerly called by
the French Grand Marais, rendered by Beltrami Great
March (for Great Marsh, II. p. 197), and now rejoicing
in the epithet of Pig's Eye marsh or lake. Pig's Eye was
the soubriquet of one Peter Parrant, a whisky-seller
who squatted on the bottom in 1838, below Carver's
Cave in the Dayton bluff. The whole region about the
mouth of St. Peter's r. had been a Sioux focus and
stamping-ground for generations before any of the
localities thereabouts received names from us. The
curious origin of the name St. Paul for the present
capital was in this wise: The limits of the military
reservation about Fort Snelling were authoritatively
fixed in 1839. The whisky-traders, loafers, and
squatters about the place became so troublesome that
the U. S. Marshal of Wisconsin was directed to remove
all such intruders, who were given till next spring to
decamp; and on May 6th, 1840, the troops were called
out to complete the eviction by the destruction of
cabins. In the words of E. D. Neill, Minn. Hist. Soc., II.
Part 2, 1864, 2d ed. 1881, p. 142: "The squatters then
retreated to the nearest point below the military
reserve, and there they became the inglorious
founders of a hamlet, which was shortly graced with
the small Roman Catholic chapel of St. Paul, the name
of which is retained by the thrifty capital of Minnesota,
which has emerged from the groggeries of 'certain
lewd fellows of the baser sort.'" The chapel above
mentioned was built by Rev. Lucian Galtier, on what is
now Catholic block; it fronted on Bench street. It was
dedicated Nov. 1st, 1841. The first marriage bans were
those of one Vital Guerin, described as "a resident of
St. Paul;" and thus the priest named the place as well
as the house, although it was also called for a time St.
Paul Landing, because some stores had been put up
close by, which caused steamboats to stop there. In
1848, when Minnesota acquired Territorial
organization, and the capital was fixed at St. Paul, no
such place could be found on ordinary maps; it was
some obscure settlement, supposed to be somewhere
about the mouth of St. Peter's r., or in the vicinity of
St. Anthony's falls, perhaps at a place known as White
Rock, or Iminijaska, where some bluffs were more
easily discernible than any village. Even down to 40
years ago, or a little before 1858, when Minnesota
acquired statehood, St. Paul had only replaced tepees
with a sprinkling of log cabins; and people scrambled
up the bluff by digging their toes into the ground. The
site of the city is one which would hardly have been
anticipated as such; nor would the original features of
the locality be easily recognized now after all the
grading and terracing that has been done to convert
the stubborn hills and intractable hollows into a
beautiful city of over 190,000 inhabitants. But all this
was to be, and is well worth all that it cost. Among the
natural features which should be noted in this
connection, especially as they have given rise to
conflicting historical statements, are Carver's Great
Cave in Dayton's bluff, and Nicollet's New (Fountain)
Cave, halfway thence to Fort Snelling; but for these, as
well as for a third cave close to Carver's, see a note
beyond, at date of Apr. 12th, 1806, when Pike's text
brings the matter up.
[I-73] Jean Baptiste Faribault, b. Berthier, Lower
Canada, 1774, d. Faribault, Minn., Aug. 20th, 1860,
being at the time the oldest white resident of the
present State. Jean Baptiste was the youngest one of
10 children of Bartholomew (who was b. in Paris and
came to Canada in 1754); he was in business in
Quebec 1790-97, at the latter date entered the employ
of J. J. Astor as an agent of the N. W. Co., and was
engaged in the Indian trade at various points in the
Mississippi region for about 50 years, for the most part
on his own account. One of the posts he established
was at the mouth of the Minnesota r., where Pike
found him. In 1814 he married a half-breed daughter
of Major Hause (then Superintendent of Indian
Affairs), by whom he had eight children. His Indian
name was Chahpahsintay, meaning Beaver Tail. His
eldest son, Alexander, founded the present town of
Faribault, Minn. Mr. J. B. Faribault "espoused the cause
of the U. S. during the war of 1812, and lost many
thousand dollars thereby, as well as narrowly escaping
with his life on several occasions. He labored all his life
to benefit the red man, teach him agriculture and the
arts of industry, and protect his interests. He had an
unbounded influence over them; his advice was never
disregarded. He was prominent at all treaties, and
rendered the U. S. many valuable services," says J. F.
Williams, Minn. Hist. Coll., I. 2d ed. 1872, p. 377: see
also ibid., p. 468. An extended memoir of Faribault, by
General H. H. Sibley, occupies pp. 168-79 of III. of the
Minn. Hist. Coll., 1874.
[I-74] The history of the discovery of St. Peter's r., off
the mouth of which Pike is now camped, is involved in
some obscurity, which modern research has not wholly
cleared up, though the main facts have probably been
certified. (1) It has been conceded since Carver's time
that Hennepin missed the river. Discovery has not
been traced back of Lesueur's time. Lesueur was first
on the Mississippi hereabouts in 1683; next in 1695,
when he built on Pelée isl., just below the St. Croix;
and again in 1700; both these rivers are noted in the
treatise of Nicolas Perrot, and before 1700 the river of
St. Pierre had been so named. (2) Charlevoix's
account, Hist. N. Fr., Paris, 1744, IV. pp. 165, 166, is in
substance: In 1700 Lesueur, sent by D'Iberville to
establish himself in the Sioux country and take
possession of a copper-mine que le Sueur y avait
découverte, had already discovered there, some time
before; ascended St. Peter 40 leagues to Rivière Verte
(now Blue Earth r.) which comes in on the left hand as
you go up; ascended this Green r. 1 league; built a fort
and wintered there, 1700-1; in April, "1702," for which
read 1701, went up Green r. ¾ league to his mine and
in 22 days got out over 30,000 lbs. of ore, of which
4,000 selected lbs. were sent to France; there was a
mountain of this mineral 10 leagues long, etc. (3) The
Amer. Philos. Society's copy of the MS. of Bénard de la
Harpe is carefully digested by Keating in Long's Exp., I.
pp. 317-322. This MS. is entitled: "Journal historique
concernant l'établissement des Français à la
Louisianne, tiré des mémoires de Messrs. d'Iberville et
de Bienville, etc., par M. Bénard de la Harpe." The
original of this copy was in the hands of Dr. Sibley,
who certifies to the correctness of the copy in a note
annexed, dated Natchitoches, Oct. 29th, 1805. Some
of the contents of this MS. are: (a) Lesueur and
d'Iberville, with 30 hands, reached the mouth of the
Mississippi Dec., 1699. Lesueur was sent there by M.
l'Huillier, fermier général, under orders to establish
himself at a place near the sources of the Mississippi,
where he had previously discovered a green ore, i. e.,
in 1695. The substance of the 1695 discovery is:
Lesueur built a fort on an island (Isle Pelée, now
Prairie isl.) in the Mississippi over 200 m. above the
Illinois, by order of Count Frontenac; and the same
year he went to Montreal with the Chippewa chief
Chingouabé and the Sioux chief Tioscaté, the latter the
first of his nation that ever was in Canada, and
received very kindly by the authorities in view of what
they hoped to make out of his country. With this Sioux
chief Lesueur had intended to reascend the Mississippi
in 1696; but the former died at Montreal after 33 days'
illness. Lesueur, thus released from an obligation to go
back with the chief to the country where he had
discovered the ore, determined to go to France to ask
leave to open mines; this voyage he made, and had
his permit in 1697. June, 1697, he embarked at La
Rochelle for Canada; was captured by the British on
the Newfoundland banks and carried to Portsmouth;
after peace, returned to Paris for a new commission,
which was issued to him in 1698; went to Canada with
this; various obstacles threw him back to Europe; and
meanwhile part of the men whom he had left in
charge in 1695 abandoned their posts and proceeded
to Montreal. Thus operations on the mines were
suspended from 1695 to 1700, for Lesueur and
d'Iberville, with their 30 workmen, as we have seen,
only reached the mouth of the Mississippi in Dec.,
1699. (b) The MS. we are following states, under date
of Feb. 10th, 1702, that Lesueur was that day come to
the mouth of the Mississippi with 2000 quintaux of
blue and green earth. This he certainly had got on his
tour of Dec., 1699-Feb., 1702, from and back to the
mouth of the Mississippi, and he had got it from the
mine he opened and worked on Rivière Verte or Blue
Earth r., the principal branch of St. Peter's. The MS.
contains a narrative of this tour from July 12th to Dec.
13th, 1700. It appears that Lesueur moved as follows:
July 13th, mouth of the Missouri; Sept. 1st, mouth of
the Wisconsin; Sept. 14th, mouth of the Chippewa (on
one of whose branches he had found a 60-lb. mass of
copper during his previous journey); same day, Lake
Pepin, so designated in the MS.; 16th, passed La Croix
r., so called from a Frenchman wrecked there; 19th,
entered St. Peter's r.; Oct. 1st had ascended this for
44¼ leagues, and then entered Blue r., so called for
the color of the earth on its banks; started an
establishment at or more probably near the mouth of
Blue r., at what the MS. gives as lat. 44° 13´ N.; Oct.
14th, finished the works, which were named Fort
L'Huillier; Oct. 26th, went to the mine with three
canoes, which he loaded with colored earth taken from
mountains near which were mines of copper, samples
of which L'Huillier had assayed at Paris in 1696.
Lesueur wintered there, 1700-1, and, as we have
seen, was back to the mouth of the Mississippi Feb.
10th, 1702. (c) From these historical data Keating in
Long, 1823, I. p. 320, infers that St. Peter's and the
Blue (Blue Earth) rivers were those streams which
Lesueur had ascended in 1695, which date is
consequently assigned to the discovery, without
reference back to 1683. This inference is made "from
the circumstance that they are mentioned as well
known, and not as recently discovered; and more
especially from the observation of la Harpe, that the
eastern Sioux having complained of the situation of
the fort [L'Huillier], which they would have wished to
see at the confluence of the St. Peter and Mississippi,
M. le Sueur endeavoured to reconcile them to it. 'He
had foreseen,' says la Harpe, 'that an establishment on
the Blue river would not be agreeable to the eastern
Sioux, who are the rulers of all the other Sioux,
because they were the first with whom the French
traded, and whom they provided with guns;
nevertheless, as this undertaking had not been
commenced with the sole view of trading for beavers,
but in order to become thoroughly acquainted with the
quality of the various mines which he had previously
discovered there [italics Keating's], he replied to the
natives that he was sorry he had not been made
sooner acquainted with their wishes, &c., but that the
advanced state of the season prevented his returning
to the mouth of the river.' No mention is made in this
narrative of the stream being obstructed with ice, a
circumstance which, had it really occurred, would, we
think, have been recorded by de la Harpe, who
appears to have been a careful and a curious observer,
and who undoubtedly saw le Sueur's original
narrative." (4) On the foregoing data Nicollet, Rep.
1843, p. 18, has some judicious remarks in fixing
Lesueur's locality with precision: "On the left bank of
the Mankato [Green, Blue, or Blue Earth r.], six miles
from its mouth, in a rocky bluff composed of
sandstone and limestone, are found cavities in which
the famed blue or green earth, used by the Sioux as
their principal pigment, is obtained. This material is
nearly exhausted, and it is not likely that this is the
spot where a Mr. Lesueur (who is mentioned in the
Narrative of Major Long's Second Expedition, as also
by Mr. Featherstonhaugh) could, in his third voyage,
during the year 1700, have collected his 4000 pounds
of copper earth sent by him to France. I have reason
to believe that Lesueur's location is on the river to
which I have affixed his name, and which empties into
the Mankato three-quarters of a league above Fort
L'Huillier, built by him and where he spent a winter.
This location corresponds precisely with that given by
Charlevoix, whilst it is totally inapplicable to the
former. Here the blue earth is abundant in the steep
and elevated hills at the mouth of this river, which hills
form a broken country on the right side of the
Mankato. Mr. [J. C.] Fremont and myself have verified
this fact: he, during his visit to Lesueur river; and I,
upon the locality designated by Mr. Featherstonhaugh,
where the Ndakotahs formerly assembled in great
numbers to collect it, but to which they now seldom
resort, as it is comparatively scarce—at least so I was
informed by Sleepy-eye, the chief of the Sissitons, who
accompanied me during this excursion." (5)
Featherstonhaugh's remarks, Canoe Voyage, etc., I. p.
280 and p. 304, seem to me less judicious than likely
to make the judicious grieve; in fine, they are
singularly obtuse to have come from so British a man
and so clever a story-teller. He heads a page in caps,
"The Copper-mine, a Fable;" he has in text, "finding the
copper-mine to be a fable"; again: "that either M. le
Sueur's green cupreous earth had not corresponded to
the expectations he had raised, or that the whole
account of it was to be classed with Baron Lahontan's"
fables, etc. This sort of talk would befog the whole
subject, were it not obvious that it has no bearing
whatever upon the historico-geographical case we are
discussing. The question is where Lesueur went, and
when he got there—not at all what he found there. It
is obtuse, I say, because unintentionally misleading,
for F'gh to say that, when he reached the bluff whence
the pigment had been taken, "Le Sueur's story lost all
credit with me, for I instantly saw that it was nothing
but a continuation of the seam which divided the
sandstone from the limestone ... containing a silicate
of iron of a blueish-green color." In the first place, F'gh
was not at exactly the right spot, which Nicollet has
pointed out. Secondly, though Lesueur should have
been mistaken or mendacious about any copper-mine
being in that region—though he should not have
collected 30,000 lbs. of ore in 22 days, or even a
gunny-sack full of anything in a year—though the
mountains should shrink to bluffs, and the whole
commercial features of the case turn into the
physiognomy of the wild-cat—that would not affect the
historical and geographical facts, viz.: Lesueur
ascended the St. Peter's to the Mankato, and this as
far at least as its first branch, thus exploring both
these rivers in 1700. Item, he had been to if not also
up the river of St. Pierre in 1695; and it had been
known since his first voyage in 1683. (6) As to the
name Rivière St. Pierre, or de St. Pierre, which we
have translated St. Peter, or St. Peter's r., the former
obscurity of its origin has, I think, been almost entirely
cleared up. Keating's Long, 1824, I. p. 322, has: "We
have sought in vain for the origin of the name; we can
find no notice of it; it appears to us at present not
unlikely that the name may have been given by le
Sueur in 1795 [slip for 1695], in honor of M. de St.
Pierre Repantigni, to whom La Hontan incidentally
alludes (I. p. 136) as being in Canada in 1789 [i. e.,
1689]. This person may have accompanied le Sueur on
his expedition." Keating does not cite in this
connection the remark of Carver, ed. 1796, p. 35:
"Here [at Lake Pepin] I discovered the ruins of a
French factory, where it is said Captain St. Pierre
resided, and carried on a very great trade with the
Naudowessies [Sioux], before the reduction of
Canada." This person was Jacques Le Gardeur St.
Pierre, who in 1737 commanded the fort on Lake
Pepin (Fort Beauharnois). One Fort St. Pierre was built
at Rainy l. late in 1731; J. Le G. St. Pierre was there in
1751: for extended notice of him, see Neill, Macalester
Coll. Cont., No. 4, 1890, pp. 136-40. His father was
Captain Paul St. Pierre, who was sent to the French
post (Maison Françoise) at La Pointe (Chaquamegon
bay) in 1718. Nicollet, Rep. 1843, p. 68, cites Carver,
and states: "I have no hesitation in assigning its [the
name's] origin to a Canadian by the name of De St.
Pierre, who resided for a long time thereabouts." The
name appears for the first time in Perrot's report, of
the date 1689, which is also the most probable date of
naming the St. Croix r. and Lake Pepin. The only
question left is, whether the river was not named to
compliment Pierre Lesueur himself. Whoever the St.
Pierre whose name the river bears may prove to be,
the name is a personal one, which we should not have
translated into English St. Peter; for it certainly has
nothing to do with the legendary saint so styled,
whose career is connected with the crowing of cocks
three times more than with the course of any river.
Had the stream been named by some priest for such a
sadly overworked patron as the apocryphal first Bishop
of Rome, we should have heard all about it in the
Jesuit Relations or elsewhere. (7) The suggestion that
the name St. Pierre is a perversion of sans pierres
("without stones"), may be dismissed as too good to
be true; for it is a settled principle of sound philology
that the easiest etymologies are the most likely to
have been invented to fit the case, ex post-facto. (8)
As to native names, Nicollet says, l. c.: "The name
which the Sioux give to the St. Peter's river is Mini-
sotah; and to St. Peter's, as a station [Mendota],
Mdote-mini-sotah. The adjective sotah is of different
translation. The Canadians translate it by a pretty
equivalent French word, brouillé—perhaps most
properly rendered into English by blear; as, for
instance, mini sotah, blear water, or the entrance of
blear water. I have entered into this explanation,
because the word sotah really means neither clear nor
turbid, as some authors have asserted; its true
meaning being readily found in the Sioux expression
ishta-sotah, blear-eyed.... The Chippeways are more
accurate; by them, the St. Peter's river [is called]
Ashkibogi-sibi, the Green Leaf river." It occurs to me
that the distinction Nicollet draws would correspond to
translucent, as distinguished on the one hand from
colorless or transparent water, and on the other from
opaque or turbid water. I may also refer to the old
medical term, gutta serena, for forming cataract of the
eye, when clear vision is obscured by a degree of
opacity that does not entirely exclude light. As applied
to water, Sioux sotah may be about equivalent to
Greek γλαυκός, Latin glaucus, variously rendered
"gray," "bluish-green," etc., and Nicollet's "blear-eyed"
be equivalent to what was called glaucoma
(γλαύκωμα). Notice what Pike says above of the color
of the water; but it must be added that, when he
speaks of the Mississippi as "remarkably red," we must
understand only a reddish-yellow hue of its shoal
portions, imparted by its sands; and by "black as ink,"
only the darker color of deeper places where the sands
do not show through. The name Mini-sota has a
number of variants: for example, Carver, who wintered
on it Nov., 1766-Apr., 1767, has "the River St. Pierre,
called by the natives the Waddapawmenesotor"; with
which compare Watapan Menesota of Long,
Watpàmenisothé of Beltrami, and the title of
Featherstonhaugh's diverting book, "A Canoe Voyage
up the Minnay Sotor," etc. It has become fixed of late
years, since an Act of Congress, approved June 19th,
1852 (Stat. at Large, X. p. 147), decreed that the
noble river should bear the name of the State through
which it flows. (9) The Minnesota r. appears on various
old maps of Louisiana (not on Hennepin's, 1683).
Franquelin's, 1688, traces it without any name, but
letters it with the name of the Indians, "Les
Mascoutens Nadouescioux," i. e., Sioux of the Prairie,
Gens du Large of the French, collectively, as
distinguished from Gens du Lac. De L'Isle's map, 1703,
has "R. St. Pierre."
[II-1] The village which Pike visited is marked on his
map on the west, upper, or left bank of the Minnesota
r., which here runs little E. of N. into the Mississippi.
The hill on the point whence the Sioux saluted him so
savagely was the scene of many a more warlike
demonstration in after-years; for here was built Fort
St. Anthony, later known as Fort Snelling, one of the
most important and permanent military establishments
in the United States, and for nearly half a century the
most notable place on the Mississippi above Prairie du
Chien. It was erected on the land which Pike secured
by the transaction his text is about to describe, and
which extended thence up the river to include the falls
of St. Anthony, and thus the site of the present great
city of Minneapolis, with St. Paul the twin metropolis of
the Northwest. The location of Fort Snelling is in
Nicollet's opinion "the finest site on the Mississippi
river"; and I should be the last to dissent from this
judgment, after my enjoyable visit to the fort in 1873,
at the invitation of General Alexander. The bluff
headland is about 105 feet above the water; the two
rivers separated by this rocky point are respectively
over 300 and nearly 600 feet broad. The height of Pilot
Knob, across the Minnesota r., is about 250 feet. The
plateau on the point of which the fort is situated
stretches indefinitely S. W.; 8 m. direct N. W. are
Minneapolis and the falls. The Mississippi receives the
Minnesota at the point of greatest convexity of a deep
bend to the S., duplicating that bend to the N. on
which St. Paul is situated, the two together forming
quite a figure of s. Nothing came of Pike's
recommendation of this site for a military post till a
report to the same effect was made by Major Long,
after his expedition of 1817, during which he reached
the place at 2 p. m., Wednesday, July 16th. On Feb.
10th, 1819, the Secretary of War, John C. Calhoun,
ordered the 5th infantry to proceed to the Mississippi
and establish regimental headquarters at the mouth of
St. Peter's r. A detachment of troops, mustering 98
rank and file, under Colonel Henry Leavenworth, who
had become lieutenant-colonel of that regiment Feb.
10th, 1818, was first cantoned at New Hope, near
Mendota, Sept. 24th, 1819, and preparations were
begun at once for a permanent structure. The winter
of 1819-20 was disastrous from scurvy. On May 5th,
1820, camp was shifted to a place near a spring,
above the graveyard, and was thereupon named Camp
Coldwater. In the spring of 1820 Jean Baptiste
Faribault located himself in the vicinity; Governor
Lewis Cass came from his exploration of the upper
Mississippi during the summer, and Lawrence
Taliaferro's Indian agency was established as Camp St.
Peter's. As usual, the colonel commanding and the
Indian agent clashed, notably in the matters of medals
and whisky. In August, 1820, Colonel Josiah Snelling,
who had become colonel of the regiment June 1st,
1819, arrived and relieved Colonel Leavenworth of the
command. He determined to build on the point
originally selected by Pike. The corner-stone of Fort St.
Anthony is supposed to have been laid Sept. 10th,
1820; and the building was so far forward in the
autumn of 1822 that the troops moved in, though it
was not completed. It is traditional that a tree on
which Pike had cut his name was ordered to be spared
in the process of construction; but, if so, it soon
disappeared. On May 10th, 1823, the first steamboat,
the Virginia, reached the fort. It brought among other
notables the Chevalier Beltrami. On July 3d, 1823,
Major Long arrived, en route to his exploration of St.
Peter's r. In 1824 General Winfield Scott visited the fort
on a tour of inspection. It does not appear to have
struck anybody before that the name of a professional
saint of the Prince of Peace was absurdly inapplicable
to any military establishment. General Scott very
sensibly reported that the name was "foreign to all our
associations," besides being "geographically incorrect,"
and recommended the post to be named Fort Snelling,
in well-deserved compliment to the distinguished
officer who had built it. The story of Fort Snelling,
from its inception to the end of all Indian collisions, is
an integral and very prominent part of the history of
Minnesota; it is an honorable record, of which citizens
and soldiery may be equally proud—one replete with
stirring scenes and thrilling episodes, which in the
lapse of years tradition has delighted to set in all the
glamour of romance. But the most sober historians
have found a wealth of material in the stern actualities
of Fort Snelling. The facts in the case need no
embellishment. The following are some of the many
references that could be given to the early history of
Fort Snelling: Occurrences in and around Fort Snelling
from 1819 to 1840, E. D. Neill, M. H. C., II. Part 2,
1864; 2d ed. 1881, pp. 102-42. Early Days at Fort
Snelling, Anon., M. H. C., I. Part 5, 1856; 2d ed. 1872,
pp. 420-438 (many inaccuracies in dates, etc.).
Running the Gauntlet, ibid., pp. 439-56, Anon.,
believed to be by W. J. Snelling, son of Josiah Snelling.
Reminiscences of Mrs. Ann Adams, 1821-29, M. H. C.,
VI. Part 2, 1891, pp. 93-112. Autobiography of Maj.
Lawrence Taliaferro, written in 1864, M. H. C., VI. Part
2, pp. 189-255 (specially interesting, as he was Indian
agent, 1819-40).
[II-2] Pike's speech at this memorable conference, the
treaty itself, and a long letter which Pike addressed to
Wilkinson in this connection on the 23d, 24th, and
25th, formed Docs. Nos. 4 and 5 of the App. to Part 1
of the orig. ed. These are given in full beyond, Chap.
V. Arts. 4, 5, and 6, where the text of the treaty is
subjected to a searching criticism in the light of
subsequent events. Here we may conveniently note
the names of the chiefs concerned in the transaction.
The best article I have seen upon this subject is that
by Dr. Thomas Foster of Duluth, in the St. Paul Daily
Democrat of May 4th, 1854, as cited by J. Fletcher
Williams in Minn. Hist. Coll., I. 2d ed. 1872, p. 379;
this, however, requires some additions and corrections.
1. Little Crow and Little Raven are English equivalents
of Petit Corbeau, which latter is a French version of
the name of the hereditary chiefs of the Kapoja band,
borne by successive individuals through several
generations. Pike's Little Crow is said by Long to have
been son of Little Crow, who was himself son of Little
Crow; and Foster identifies Pike's Little Crow "as the
grandfather of the present chief, Little Crow," i. e., of
one of this name who was chief in 1854, adding neatly
that "he was the Great Crow of all," i. e., the most
celebrated of all those who bore the name. This
reference would seem to cover five generations, from
Pike's Little Crow backward to his grandfather and
forward to his grandson. Riggs renders Pike's Little
Crow's name Chatanwakoowamani, Who-walks-
pursuing-a-hawk; says that his son's name was
Wamdetanka, or Big Eagle, who flourished in the
thirties; and adds that the dynasty became extinct
with Taoyatidoota (or Towaiotadootah), who was the
Little Crow of the Sioux outbreak of 1862. He was a
very black crow indeed, this last of the Corvidæ, and
was killed by a Mr. Lamson in 1863. Confining
attention now to the one who seems by this reckoning
to have been Little Crow III. of the series I.-V., we find
him tabulated by Pike as Chatewaconamini. We have
already found him cited by Long as
Chetanwakoamene, rendered Good Sparrow Hunter.
Beltrami, II. p. 191, presents Chatewaconamani, or the
Little Raven, as the chief in 1823. Featherstonhaugh
has a chief he calls Tchaypehamonee, or Little Crow,
living in 1835. Rev. Dr. Neill has in one place
Chatonwahtooamany, Petit Corbeau. Dr. Foster gives
the Dakota name as Tchahtanwahkoowahmane, or the
Hawk that Chases Walking. Pike's Little Crow lived
many years after he "touched the quill" (signed his x
mark) to the cession, and was in Washington in 1824.
Schoolcraft, who held a council with the Wahpeton
Sioux at Fort Snelling, July 25th, 1832, says, Narr.,
etc., 1834, p. 146: "The aged chief Petite [sic] Corbeau
uttered their reply. I recognized in this chief one of the
signers of the grant of land made at this place 26
years ago, when the site of the fort was first visited by
the late General Pike." The death of this good man (in
1834?) occurred from a mortal wound he accidentally
inflicted upon himself in drawing his gun from a
wagon, at his village of Kaposia. The circumstances
are narrated with interesting particulars by General H.
H. Sibley, Minn. Hist. Coll., III. 1874, pp. 251-54.
2. The chief here and consistently throughout Pike's
book of 1810 called Fils de Pinchow appears in the
1807 text as Fils de Penichon, Penechon, or Pinechon;
but nowhere are we told of whom this eminent
individual was the son. The name seems to have been
one to conjure with; and our curiosity is excited to
discover Pinchow I., who was such a personage that
Pike's Fils de Pinchow, or Pinchow II., needed no other
title to glory. On looking up this subject, I find, first,
that "Pinchow," as rendered in the above text, and the
three forms given in the 1807 print, are four variants
of a word which is also written Pinichon, Pinchon,
Penition, Pinneshaw, etc., in French or English; and
that these are corruptions of a Dakota word. Thus
Beltrami, II. p. 207, introduces us to one
Tacokoquipesceni, or Panisciowa, as being in 1823
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
More than just a book-buying platform, we strive to be a bridge
connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.
Join us on a journey of knowledge exploration, passion nurturing, and
personal growth every day!
ebookbell.com

Ms Course 10266a Programming In C With Microsoft Visual Studio 2010 Trainer Edition Volume 1 Microsoft

  • 1.
    Ms Course 10266aProgramming In C With Microsoft Visual Studio 2010 Trainer Edition Volume 1 Microsoft download https://ebookbell.com/product/ms-course-10266a-programming-in-c- with-microsoft-visual-studio-2010-trainer-edition- volume-1-microsoft-2113632 Explore and download more ebooks at ebookbell.com
  • 2.
    Here are somerecommended products that we believe you will be interested in. You can click the link to download. Ms Course 10266a Programming In C With Microsoft Visual Studio 2010 Trainer Edition Volume 2 Microsoft https://ebookbell.com/product/ms-course-10266a-programming-in-c-with- microsoft-visual-studio-2010-trainer-edition- volume-2-microsoft-2113634 Planning Designing A Ms Lync Server 2010 Soln Course 10534a Trainer Hbk https://ebookbell.com/product/planning-designing-a-ms-lync- server-2010-soln-course-10534a-trainer-hbk-4093606 Deploying Config Admin Ms Lync Server 2010 Course 10533a Trainer Hbk https://ebookbell.com/product/deploying-config-admin-ms-lync- server-2010-course-10533a-trainer-hbk-4089988 Moc Course 2783a Designing The Data Tier For Microsoft Sql Server Delivery Guide https://ebookbell.com/product/moc-course-2783a-designing-the-data- tier-for-microsoft-sql-server-delivery-guide-1278240
  • 3.
    Moc Course 2783aDesigning The Data Tier For Microsoft Sql Server Beta Trainer Guide https://ebookbell.com/product/moc-course-2783a-designing-the-data- tier-for-microsoft-sql-server-beta-trainer-guide-1278242 Moc Course 4356a Managing Branch Office Resources Using Microsoft Windows Server R2 https://ebookbell.com/product/moc-course-4356a-managing-branch-office- resources-using-microsoft-windows-server-r2-1278244 Moc Course 4357a Managing Data Storage Using Microsoft Windows Server R2 https://ebookbell.com/product/moc-course-4357a-managing-data-storage- using-microsoft-windows-server-r2-1278246 Moc Course 4358a Deploying And Managing Active Directory Federation Services In Microsoft Windows Server R2 https://ebookbell.com/product/moc-course-4358a-deploying-and-managing- active-directory-federation-services-in-microsoft-windows- server-r2-1278248 The Atlantis Twins The Mermaid Curse Book One Ms Kaminsky Kaminsky https://ebookbell.com/product/the-atlantis-twins-the-mermaid-curse- book-one-ms-kaminsky-kaminsky-22477036
  • 5.
    O F FI C I A L M I C R O S O F T L E A R N I N G P R O D U C T 10266A Programming in C# with Microsoft® Visual Studio® 2010 Be sure to access the extended learning content on your Course Companion CD enclosed on the back cover of the book.
  • 6.
    ii Programming inC# with Microsoft® Visual Studio® 2010 Information in this document, including URL and other Internet Web site references, is subject to change without notice. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person, place or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. The names of manufacturers, products, or URLs are provided for informational purposes only and Microsoft makes no representations and warranties, either expressed, implied, or statutory, regarding these manufacturers or the use of the products with any Microsoft technologies. The inclusion of a manufacturer or product does not imply endorsement of Microsoft of the manufacturer or product. Links may be provided to third party sites. Such sites are not under the control of Microsoft and Microsoft is not responsible for the contents of any linked site or any link contained in a linked site, or any changes or updates to such sites. Microsoft is not responsible for webcasting or any other form of transmission received from any linked site. Microsoft is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement of Microsoft of the site or the products contained therein. © 2010 Microsoft Corporation. All rights reserved. Microsoft, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. All other trademarks are property of their respective owners. Product Number: 10266A Part Number: 01918 Released: 09/2010
  • 7.
    MICROSOFT LICENSE TERMS OFFICIALMICROSOFT LEARNING PRODUCTS - TRAINER EDITION – Pre-Release and Final Release Versions These license terms are an agreement between Microsoft Corporation and you. Please read them. They apply to the Licensed Content named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft • updates, • supplements, • Internet-based services, and • support services for this Licensed Content, unless other terms accompany those items. If so, those terms apply. By using the Licensed Content, you accept these terms. If you do not accept them, do not use the Licensed Content. If you comply with these license terms, you have the rights below. 1. DEFINITIONS. a. “Academic Materials” means the printed or electronic documentation such as manuals, workbooks, white papers, press releases, datasheets, and FAQs which may be included in the Licensed Content. b. “Authorized Learning Center(s)” means a Microsoft Certified Partner for Learning Solutions location, an IT Academy location, or such other entity as Microsoft may designate from time to time. c. “Authorized Training Session(s)” means those training sessions authorized by Microsoft and conducted at or through Authorized Learning Centers by a Trainer providing training to Students solely on Official Microsoft Learning Products (formerly known as Microsoft Official Curriculum or “MOC”) and Microsoft Dynamics Learning Products (formerly know as Microsoft Business Solutions Courseware). Each Authorized Training Session will provide training on the subject matter of one (1) Course. d. “Course” means one of the courses using Licensed Content offered by an Authorized Learning Center during an Authorized Training Session, each of which provides training on a particular Microsoft technology subject matter. e. “Device(s)” means a single computer, device, workstation, terminal, or other digital electronic or analog device. f. “Licensed Content” means the materials accompanying these license terms. The Licensed Content may include, but is not limited to, the following elements: (i) Trainer Content, (ii) Student Content, (iii) classroom setup guide, and (iv) Software. There are different and separate components of the Licensed Content for each Course. g. “Software” means the Virtual Machines and Virtual Hard Disks, or other software applications that may be included with the Licensed Content. h. “Student(s)” means a student duly enrolled for an Authorized Training Session at your location.
  • 8.
    i. “Student Content”means the learning materials accompanying these license terms that are for use by Students and Trainers during an Authorized Training Session. Student Content may include labs, simulations, and courseware files for a Course. j. “Trainer(s)” means a) a person who is duly certified by Microsoft as a Microsoft Certified Trainer and b) such other individual as authorized in writing by Microsoft and has been engaged by an Authorized Learning Center to teach or instruct an Authorized Training Session to Students on its behalf. k. “Trainer Content” means the materials accompanying these license terms that are for use by Trainers and Students, as applicable, solely during an Authorized Training Session. Trainer Content may include Virtual Machines, Virtual Hard Disks, Microsoft PowerPoint files, instructor notes, and demonstration guides and script files for a Course. l. “Virtual Hard Disks” means Microsoft Software that is comprised of virtualized hard disks (such as a base virtual hard disk or differencing disks) for a Virtual Machine that can be loaded onto a single computer or other device in order to allow end-users to run multiple operating systems concurrently. For the purposes of these license terms, Virtual Hard Disks will be considered “Trainer Content”. m. “Virtual Machine” means a virtualized computing experience, created and accessed using Microsoft® Virtual PC or Microsoft® Virtual Server software that consists of a virtualized hardware environment, one or more Virtual Hard Disks, and a configuration file setting the parameters of the virtualized hardware environment (e.g., RAM). For the purposes of these license terms, Virtual Hard Disks will be considered “Trainer Content”. n. “you” means the Authorized Learning Center or Trainer, as applicable, that has agreed to these license terms. 2. OVERVIEW. Licensed Content. The Licensed Content includes Software, Academic Materials (online and electronic), Trainer Content, Student Content, classroom setup guide, and associated media. License Model. The Licensed Content is licensed on a per copy per Authorized Learning Center location or per Trainer basis. 3. INSTALLATION AND USE RIGHTS. a. Authorized Learning Centers and Trainers: For each Authorized Training Session, you may: i. either install individual copies of the relevant Licensed Content on classroom Devices only for use by Students enrolled in and the Trainer delivering the Authorized Training Session, provided that the number of copies in use does not exceed the number of Students enrolled in and the Trainer delivering the Authorized Training Session, OR ii. install one copy of the relevant Licensed Content on a network server only for access by classroom Devices and only for use by Students enrolled in and the Trainer delivering the Authorized Training Session, provided that the number of Devices accessing the Licensed Content on such server does not exceed the number of Students enrolled in and the Trainer delivering the Authorized Training Session. iii. and allow the Students enrolled in and the Trainer delivering the Authorized Training Session to use the Licensed Content that you install in accordance with (ii) or (ii) above during such Authorized Training Session in accordance with these license terms.
  • 9.
    i. Separation ofComponents. The components of the Licensed Content are licensed as a single unit. You may not separate the components and install them on different Devices. ii. Third Party Programs. The Licensed Content may contain third party programs. These license terms will apply to the use of those third party programs, unless other terms accompany those programs. b. Trainers: i. Trainers may Use the Licensed Content that you install or that is installed by an Authorized Learning Center on a classroom Device to deliver an Authorized Training Session. ii. Trainers may also Use a copy of the Licensed Content as follows: A. Licensed Device. The licensed Device is the Device on which you Use the Licensed Content. You may install and Use one copy of the Licensed Content on the licensed Device solely for your own personal training Use and for preparation of an Authorized Training Session. B. Portable Device. You may install another copy on a portable device solely for your own personal training Use and for preparation of an Authorized Training Session. 4. PRE-RELEASE VERSIONS. If this is a pre-release (“beta”) version, in addition to the other provisions in this agreement, these terms also apply: a. Pre-Release Licensed Content. This Licensed Content is a pre-release version. It may not contain the same information and/or work the way a final version of the Licensed Content will. We may change it for the final, commercial version. We also may not release a commercial version. You will clearly and conspicuously inform any Students who participate in each Authorized Training Session of the foregoing; and, that you or Microsoft are under no obligation to provide them with any further content, including but not limited to the final released version of the Licensed Content for the Course. b. Feedback. If you agree to give feedback about the Licensed Content to Microsoft, you give to Microsoft, without charge, the right to use, share and commercialize your feedback in any way and for any purpose. You also give to third parties, without charge, any patent rights needed for their products, technologies and services to use or interface with any specific parts of a Microsoft software, Licensed Content, or service that includes the feedback. You will not give feedback that is subject to a license that requires Microsoft to license its software or documentation to third parties because we include your feedback in them. These rights survive this agreement. c. Confidential Information. The Licensed Content, including any viewer, user interface, features and documentation that may be included with the Licensed Content, is confidential and proprietary to Microsoft and its suppliers. i. Use. For five years after installation of the Licensed Content or its commercial release, whichever is first, you may not disclose confidential information to third parties. You may disclose confidential information only to your employees and consultants who need to know the information. You must have written agreements with them that protect the confidential information at least as much as this agreement. ii. Survival. Your duty to protect confidential information survives this agreement. iii. Exclusions. You may disclose confidential information in response to a judicial or governmental order. You must first give written notice to Microsoft to allow it to seek a
  • 10.
    protective order orotherwise protect the information. Confidential information does not include information that • becomes publicly known through no wrongful act; • you received from a third party who did not breach confidentiality obligations to Microsoft or its suppliers; or • you developed independently. d. Term. The term of this agreement for pre-release versions is (i) the date which Microsoft informs you is the end date for using the beta version, or (ii) the commercial release of the final release version of the Licensed Content, whichever is first (“beta term”). e. Use. You will cease using all copies of the beta version upon expiration or termination of the beta term, and will destroy all copies of same in the possession or under your control and/or in the possession or under the control of any Trainers who have received copies of the pre-released version. f. Copies. Microsoft will inform Authorized Learning Centers if they may make copies of the beta version (in either print and/or CD version) and distribute such copies to Students and/or Trainers. If Microsoft allows such distribution, you will follow any additional terms that Microsoft provides to you for such copies and distribution. 5. ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS. a. Authorized Learning Centers and Trainers: i. Software. ii. Virtual Hard Disks. The Licensed Content may contain versions of Microsoft XP, Microsoft Windows Vista, Windows Server 2003, Windows Server 2008, and Windows 2000 Advanced Server and/or other Microsoft products which are provided in Virtual Hard Disks. A. If the Virtual Hard Disks and the labs are launched through the Microsoft Learning Lab Launcher, then these terms apply: Time-Sensitive Software. If the Software is not reset, it will stop running based upon the time indicated on the install of the Virtual Machines (between 30 and 500 days after you install it). You will not receive notice before it stops running. You may not be able to access data used or information saved with the Virtual Machines when it stops running and may be forced to reset these Virtual Machines to their original state. You must remove the Software from the Devices at the end of each Authorized Training Session and reinstall and launch it prior to the beginning of the next Authorized Training Session. B. If the Virtual Hard Disks require a product key to launch, then these terms apply: Microsoft will deactivate the operating system associated with each Virtual Hard Disk. Before installing any Virtual Hard Disks on classroom Devices for use during an Authorized Training Session, you will obtain from Microsoft a product key for the operating system software for the Virtual Hard Disks and will activate such Software with Microsoft using such product key. C. These terms apply to all Virtual Machines and Virtual Hard Disks:
  • 11.
    You may onlyuse the Virtual Machines and Virtual Hard Disks if you comply with the terms and conditions of this agreement and the following security requirements: o You may not install Virtual Machines and Virtual Hard Disks on portable Devices or Devices that are accessible to other networks. o You must remove Virtual Machines and Virtual Hard Disks from all classroom Devices at the end of each Authorized Training Session, except those held at Microsoft Certified Partners for Learning Solutions locations. o You must remove the differencing drive portions of the Virtual Hard Disks from all classroom Devices at the end of each Authorized Training Session at Microsoft Certified Partners for Learning Solutions locations. o You will ensure that the Virtual Machines and Virtual Hard Disks are not copied or downloaded from Devices on which you installed them. o You will strictly comply with all Microsoft instructions relating to installation, use, activation and deactivation, and security of Virtual Machines and Virtual Hard Disks. o You may not modify the Virtual Machines and Virtual Hard Disks or any contents thereof. o You may not reproduce or redistribute the Virtual Machines or Virtual Hard Disks. ii. Classroom Setup Guide. You will assure any Licensed Content installed for use during an Authorized Training Session will be done in accordance with the classroom set-up guide for the Course. iii. Media Elements and Templates. You may allow Trainers and Students to use images, clip art, animations, sounds, music, shapes, video clips and templates provided with the Licensed Content solely in an Authorized Training Session. If Trainers have their own copy of the Licensed Content, they may use Media Elements for their personal training use. iv. iv Evaluation Software. Any Software that is included in the Student Content designated as “Evaluation Software” may be used by Students solely for their personal training outside of the Authorized Training Session. b. Trainers Only: i. Use of PowerPoint Slide Deck Templates. The Trainer Content may include Microsoft PowerPoint slide decks. Trainers may use, copy and modify the PowerPoint slide decks only for providing an Authorized Training Session. If you elect to exercise the foregoing, you will agree or ensure Trainer agrees: (a) that modification of the slide decks will not constitute creation of obscene or scandalous works, as defined by federal law at the time the work is created; and (b) to comply with all other terms and conditions of this agreement. ii. Use of Instructional Components in Trainer Content. For each Authorized Training Session, Trainers may customize and reproduce, in accordance with the MCT Agreement, those portions of the Licensed Content that are logically associated with instruction of the Authorized Training Session. If you elect to exercise the foregoing rights, you agree or ensure the Trainer agrees: (a) that any of these customizations or reproductions will only be used for providing an Authorized Training Session and (b) to comply with all other terms and conditions of this agreement.
  • 12.
    iii. Academic Materials.If the Licensed Content contains Academic Materials, you may copy and use the Academic Materials. You may not make any modifications to the Academic Materials and you may not print any book (either electronic or print version) in its entirety. If you reproduce any Academic Materials, you agree that: • The use of the Academic Materials will be only for your personal reference or training use • You will not republish or post the Academic Materials on any network computer or broadcast in any media; • You will include the Academic Material’s original copyright notice, or a copyright notice to Microsoft’s benefit in the format provided below: Form of Notice: © 2010 Reprinted for personal reference use only with permission by Microsoft Corporation. All rights reserved. Microsoft, Windows, and Windows Server are either registered trademarks or trademarks of Microsoft Corporation in the US and/or other countries. Other product and company names mentioned herein may be the trademarks of their respective owners. 6. INTERNET-BASED SERVICES. Microsoft may provide Internet-based services with the Licensed Content. It may change or cancel them at any time. You may not use these services in any way that could harm them or impair anyone else’s use of them. You may not use the services to try to gain unauthorized access to any service, data, account or network by any means. 7. SCOPE OF LICENSE. The Licensed Content is licensed, not sold. This agreement only gives you some rights to use the Licensed Content. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the Licensed Content only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the Licensed Content that only allow you to use it in certain ways. You may not • install more copies of the Licensed Content on classroom Devices than the number of Students and the Trainer in the Authorized Training Session; • allow more classroom Devices to access the server than the number of Students enrolled in and the Trainer delivering the Authorized Training Session if the Licensed Content is installed on a network server; • copy or reproduce the Licensed Content to any server or location for further reproduction or distribution; • disclose the results of any benchmark tests of the Licensed Content to any third party without Microsoft’s prior written approval; • work around any technical limitations in the Licensed Content; • reverse engineer, decompile or disassemble the Licensed Content, except and only to the extent that applicable law expressly permits, despite this limitation; • make more copies of the Licensed Content than specified in this agreement or allowed by applicable law, despite this limitation; • publish the Licensed Content for others to copy;
  • 13.
    • transfer theLicensed Content, in whole or in part, to a third party; • access or use any Licensed Content for which you (i) are not providing a Course and/or (ii) have not been authorized by Microsoft to access and use; • rent, lease or lend the Licensed Content; or • use the Licensed Content for commercial hosting services or general business purposes. • Rights to access the server software that may be included with the Licensed Content, including the Virtual Hard Disks does not give you any right to implement Microsoft patents or other Microsoft intellectual property in software or devices that may access the server. 8. EXPORT RESTRICTIONS. The Licensed Content is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the Licensed Content. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting. 9. NOT FOR RESALE SOFTWARE/LICENSED CONTENT. You may not sell software or Licensed Content marked as “NFR” or “Not for Resale.” 10. ACADEMIC EDITION. You must be a “Qualified Educational User” to use Licensed Content marked as “Academic Edition” or “AE.” If you do not know whether you are a Qualified Educational User, visit www.microsoft.com/education or contact the Microsoft affiliate serving your country. 11. TERMINATION. Without prejudice to any other rights, Microsoft may terminate this agreement if you fail to comply with the terms and conditions of these license terms. In the event your status as an Authorized Learning Center or Trainer a) expires, b) is voluntarily terminated by you, and/or c) is terminated by Microsoft, this agreement shall automatically terminate. Upon any termination of this agreement, you must destroy all copies of the Licensed Content and all of its component parts. 12. ENTIRE AGREEMENT. This agreement, and the terms for supplements, updates, Internet- based services and support services that you use, are the entire agreement for the Licensed Content and support services. 13. APPLICABLE LAW. a. United States. If you acquired the Licensed Content in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort. b. Outside the United States. If you acquired the Licensed Content in any other country, the laws of that country apply. 14. LEGAL EFFECT. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the Licensed Content. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so. 15. DISCLAIMER OF WARRANTY. The Licensed Content is licensed “as-is.” You bear the risk of using it. Microsoft gives no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this agreement cannot change. To the extent permitted under your local laws, Microsoft excludes the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
  • 14.
    16. LIMITATION ONAND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES. This limitation applies to • anything related to the Licensed Content, software, services, content (including code) on third party Internet sites, or third party programs; and • claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law. It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages. Please note: As this Licensed Content is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French. Remarque : Ce le contenu sous licence étant distribué au Québec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français. EXONÉRATION DE GARANTIE. Le contenu sous licence visé par une licence est offert « tel quel ». Toute utilisation de ce contenu sous licence est à votre seule risque et péril. Microsoft n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection dues consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues. LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices. Cette limitation concerne: • tout ce qui est relié au le contenu sous licence , aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et • les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur. Elle s’applique également, même si Microsoft connaissait ou devrait connaître l’éventualité d’un tel dommage. Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne s’appliquera pas à votre égard. EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas.
  • 15.
    Thank you fortaking our training! We’ve worked together with our Microsoft Certified Partners for Learning Solutions and our Microsoft IT Academies to bring you a world-class learning experience—whether you’re a professional looking to advance your skills or a student preparing for a career in IT. n Microsoft Certified Trainers and Instructors—Your instructor is a technical and instructional expert who meets ongoing certification requirements. And, if instructors are delivering training at one of our Certified Partners for Learning Solutions, they are also evaluated throughout the year by students and by Microsoft. n Certification Exam Benefits—After training, consider taking a Microsoft Certification exam. Microsoft Certifications validate your skills on Microsoft technologies and can help differentiate you when finding a job or boosting your career. In fact, independent research by IDC concluded that 75% of managers believe certifications are important to team performance1 . Ask your instructor about Microsoft Certification exam promotions and discounts that may be available to you. n Customer Satisfaction Guarantee—Our Certified Partners for Learning Solutions offer a satisfaction guarantee and we hold them accountable for it. At the end of class, please complete an evaluation of today’s experience. We value your feedback! We wish you a great learning experience and ongoing success in your career! Sincerely, Microsoft Learning www.microsoft.com/learning 1 IDC, Value of Certification: Team Certification and Organizational Performance, November 2006 Welcome!
  • 17.
    Programming in C#with Microsoft® Visual Studio® 2010 iii Acknowledgement Microsoft Learning would like to acknowledge and thank the following for their contribution towards developing this title. Their effort at various stages in the development has ensured that you have a good classroom experience. John Sharp—Content Developer John Sharp is a principal technologist at Content Master, part of CM Group Ltd, a technical authoring and consulting company. An expert on developing applications with the Microsoft® .NET Framework and interoperability issues, John has produced numerous courses, tutorials, white papers, and presentations on distributed systems, Web services, and the C# language. John is the author of several popular books, including five editions of Microsoft Visual C# Step by Step and Microsoft Windows Communication Foundation Step by Step. Antony Norris—Content Developer Antony Norris is a senior technologist at Content Master, part of CM Group Ltd, a technical authoring and consulting company. Antony is a Microsoft Visual C#® developer who specializes in various .NET Framework technologies, including ASP.NET, Windows® Communication Foundation, and Windows Mobile. Antony has worked on several other Microsoft Learning courses, including Programming with the Microsoft .NET Framework Using Microsoft Visual Studio 2005 and Visual Studio 2008 Connected Systems: Windows Communication Foundation. Mike Sumsion—Content Developer Mike Sumsion is a senior technologist at Content Master, part of CM Group Ltd, a technical authoring and consulting company. Mike is a developer who specializes in SharePoint Products and Technologies, .NET Framework client applications, and Windows Mobile. Mike has worked on several other Microsoft Learning courses, including Developing Solutions with MS Windows SharePoint Services 3.0 and Visual Studio 2005 and Core Web Application Technologies with Microsoft Visual Studio 2005. Chris Barker—Technical Reviewer Chris Barker is an MCT working in the New Zealand market currently employed as a staff trainer at Auldhouse, one of New Zealand’s major CPLS training centers in Wellington. Chris’ background includes programming from the early 1970s—his first program was written in assembly language and debugged in binary (literally)! While focusing training on programming (mostly using the .NET Framework) and
  • 18.
    iv Programming inC# with Microsoft® Visual Studio® 2010 databases (mostly Microsoft SQL Server) Chris has also been an infrastructure trainer and has Microsoft networking qualifications. Bill Chapman – Technical Reviewer Bill is the Principal Architect at Chapman and Associates. He helps the Microsoft Certified Trainer Community with custom courses on how to succeed as a small business as a Microsoft Certified Trainer. He is now in his fourteenth year as an MCT. Before joining Microsoft in 2007 he spent 11 years specializing in developer and database training. He has taught as both a staff instructor and as an independent contractor throughout his career, and has taught courses all around the world. Manish Sharma – Open Beta Facilitator Manish Sharma is an MCT with more than 7 Years of experience in Software Technology Training. Apart from being MCT, MCTS, and MCP he has a Masters in Computer Applications, gained as part of his formal education. He conducts .NET Technology training courses on behalf of Microsoft for Microsoft Certified Partners and other Microsoft clients. He has a vast experience in conducting developer- centric training on various versions of the Microsoft .NET Framework, Visual Studio, and SharePoint technologies.
  • 19.
    Programming in C#with Microsoft® Visual Studio® 2010 v Contents Module 1: Introducing C# and the .NET Framework Lesson 1: Introduction to the .NET Framework 4 1-4 Lesson 2: Creating Projects Within Visual Studio 2010 1-16 Lesson 3: Writing a C# Application 1-33 Lesson 4: Building a Graphical Application 1-44 Lesson 5: Documenting an Application 1-58 Lesson 6: Debugging Applications by Using Visual Studio 2010 1-66 Lab: Introducing C# and the .NET Framework 1-78 Module 2: Using C# Programming Constructs Lesson 1: Declaring Variables and Assigning Values 2-4 Lesson 2: Using Expressions and Operators 2-23 Lesson 3: Creating and Using Arrays 2-36 Lesson 4: Using Decision Statements 2-49 Lesson 5: Using Iteration Statements 2-63 Lab: Using C# Programming Constructs 2-78 Module 3: Declaring and Calling Methods Lesson 1: Defining and Invoking Methods 3-3 Lesson 2: Specifying Optional Parameters and Output Parameters 3-29 Lab: Declaring and Calling Methods 3-39 Module 4: Handling Exceptions Lesson 1: Handling Exceptions 4-3 Lesson 2: Raising Exceptions 4-23 Lab: Handling Exceptions 4-34
  • 20.
    vi Programming inC# with Microsoft® Visual Studio® 2010 Module 5: Reading and Writing Files Lesson 1: Accessing the File System 5-3 Lesson 2: Reading and Writing Files by Using Streams 5-27 Lab: Reading and Writing Files 5-45 Module 6: Creating New Types Lesson 1: Creating and Using Enumerations 6-3 Lesson 2: Creating and Using Classes 6-12 Lesson 3: Creating and Using Structures 6-33 Lesson 4: Comparing References to Values 6-41 Lab: Creating New Types 6-55 Module 7: Encapsulating Data and Methods Lesson 1: Controlling Visibility of Type Members 7-4 Lesson 2: Sharing Methods and Data 7-15 Lab: Encapsulating Data and Methods 7-29 Module 8: Inheriting from Classes and Implementing Interfaces Lesson 1: Using Inheritance to Define New Reference Types 8-3 Lesson 2: Defining and Implementing Interfaces 8-27 Lesson 3: Defining Abstract Classes 8-45 Lab: Inheriting from Classes and Implementing Interfaces 8-56 Module 9: Managing the Lifetime of Objects and Controlling Resources Lesson 1: Introduction to Garbage Collection 9-4 Lesson 2: Managing Resources 9-21 Lab: Managing the Lifetime of Objects and Controlling Resources 9-35 Module 10: Encapsulating Data and Defining Overloaded Operators Lesson 1: Creating and Using Properties 10-4 Lab A: Creating and Using Properties 10-26 Lesson 2: Creating and Using Indexers 10-38 Lab B: Creating and Using Indexers 10-50
  • 21.
    Programming in C#with Microsoft® Visual Studio® 2010 vii Lesson 3: Overloading Operators 10-60 Lab C: Overloading Operators 10-79 Module 11: Decoupling Methods and Handling Events Lesson 1: Declaring and Using Delegates 11-4 Lesson 2: Using Lambda Expressions 11-14 Lesson 3: Handling Events 11-22 Lab: Decoupling Methods and Handling Events 11-38 Module 12: Using Collections and Building Generic Types Lesson 1: Using Collections 12-4 Lab A: Using Collections 12-22 Lesson 2: Creating and Using Generic Types 12-28 Lesson 3: Defining Generic Interfaces and Understanding Variance 12-42 Lesson 4: Using Generic Methods and Delegates 12-56 Lab B: Building Generic Types 12-69 Module 13: Building and Enumerating Custom Collection Classes Lesson 1: Implementing a Custom Collection Class 13-3 Lesson 2: Adding an Enumerator to a Custom Collection Class 13-21 Lab: Building and Enumerating Custom Collection Classes 13-37 Module 14: Using LINQ to Query Data Lesson 1: Using the LINQ Extension Methods and Query Operators 14-3 Lesson 2: Building Dynamic LINQ Queries and Expressions 14-28 Lab: Using LINQ to Query Data 14-47 Module 15: Integrating Visual C# Code with Dynamic Languages and COM Components Lesson 1: Integrating Visual C# Code with Ruby and Python 15-4 Lesson 2: Accessing COM Components from Visual C# 15-19 Lab: Integrating Visual C# Code with Dynamic Languages and COM Components 15-36
  • 22.
    viii Programming inC# with Microsoft® Visual Studio® 2010 Appendix: Lab Answer Keys Module 1 Lab: Introducing C# and the .NET Framework L1-1 Module 2 Lab: Using C# Programming Constructs L2-1 Module 3 Lab: Declaring and Calling Methods L3-1 Module 4 Lab: Handling Exceptions L4-1 Module 5 Lab: Reading and Writing Files L5-1 Module 6 Lab: Creating New Types L6-1 Module 7 Lab: Encapsulating Data and Methods L7-1 Module 8 Lab: Inheriting from Classes and Implementing Interfaces L8-1 Module 9 Lab: Managing the Lifetime of Objects and Controlling Resources L9-1 Module 10 Lab A: Creating and Using Properties L10A-1 Module 10 Lab B: Creating and Using Indexers L10B-1 Module 10 Lab C: Overloading Operators L10C-1 Module 11 Lab: Decoupling Methods and Handling Events L11-1 Module 12 Lab A: Using Collections L12A-1 Module 12 Lab B: Building Generic Types L12B-1 Module 13 Lab: Building and Enumerating Custom Collection Classes L13-1 Module 14 Lab: Using LINQ to Query Data L14-1 Module 15 Lab: Integrating Visual C# Code with Dynamic Languages and COM Components L15-1
  • 23.
    About This Coursei About This Course This section provides you with a brief description of the course, audience, suggested prerequisites, and course objectives. Course Description This course teaches you C# language syntax, program structure, and implementation by using Microsoft® Visual Studio® 2010 and the Microsoft .NET Framework 4. This course provides a solid foundation in C# to the level necessary to enable students to attend other courses in the Technical Specialist tracks. Audience This course is intended for experienced developers who already have programming experience in C, C++, Microsoft Visual Basic®, or Java and understand the concepts of object-oriented programming. This course is not designed for new programmers; it is targeted at professional developers with at least 12 months experience of programming in an object- oriented environment. Student Prerequisites This course requires that you meet the following prerequisites: • C++, Java, or experience with another programming language and knowledge of the following items: • Creating classes • Inheritance and abstraction • Polymorphism • Interfaces • Exceptions • Knowledge of the Visual Studio integrated development environment (IDE).
  • 24.
    ii About ThisCourse Course Objectives After completing this course, students will be able to: • Describe the purpose of the .NET Framework, and explain how to use Microsoft Visual C#® and Visual Studio 2010 to build .NET Framework applications. • Describe the syntax of basic C# programming constructs. • Describe how to create and call methods. • Describe how to catch, handle, and throw exceptions. • Describe how to perform basic file I/O operations in a Visual C# application. • Describe how to create and use new types (enumerations, classes, and structures), and explain the differences between reference types and value types. • Describe how to control the visibility and lifetime of members in a type. • Describe how to use inheritance to create new reference types. • Describe how to manage the lifetime of objects and control the use of resources. • Describe how to create properties and indexers to encapsulate data, and explain how to define operators for this data. • Describe how to decouple an operation from the method that implements it, and explain how to use these decoupled operations to handle asynchronous events. • Describe the purpose of collections, and explain how to use generics to implement type-safe collection classes, structures, interfaces, and methods. • Describe how to implement custom collection classes that support enumeration. • Describe how to query in-memory data by using Language-Integrated Query (LINQ) queries. • Describe how to integrate code written by using a dynamic language such as Ruby and Python, or technologies such as Component Object Model (COM), into a C# application.
  • 25.
    About This Courseiii Course Outline This section provides an outline of the course: Module 1, "Introducing C# and the .NET Framework," provides an overview of the .NET Framework and shows how you can start to build your own .NET Framework applications by using C# and Visual Studio 2010. Module 2, "Using C# Programming Constructs," provides an introduction to C# programming language syntax and introduces many of the basic C# language data types and programming constructs. Module 3, "Declaring and Calling Methods," introduces the concept of methods and describes how, in object-oriented languages such as C#, a method is a unit of code that is designed to perform a discrete piece of work. This module shows you how to declare and call methods by using C#. Module 4, "Handling Exceptions," introduces the importance of exception handling and explains why applications should be designed with exception handling in mind. This module explains how you can implement effective exception handling in your applications and describes how to use exceptions in your methods to indicate an error condition to the code that calls your methods. Module 5, "Reading and Writing Files," explains how the ability to access and manipulate files on the file system is a common requirement for many applications. This module shows you how to read and write to files by using the classes in the .NET Framework. It also describes the different approaches that you can take and explains how to read and write different formats of data. Module 6, "Creating New Types," explains how to build your own types that model items in the real world and describes how to implement the business logic for these items that your applications require. This module explains the differences between reference types and value types. Module 7, "Encapsulating Data and Methods," describes how to use the access modifiers that C# provides to enable you to implement encapsulation. This module also introduces the static modifier, which enables you to define members that can be shared over multiple instances of the same type. Module 8, "Inheriting from Classes and Implementing Interfaces," explains that inheritance is a key concept in an object-oriented language and describes how you can use inheritance, interfaces, and abstract classes to develop object hierarchies. This module also explains how you can use these object hierarchies to help reduce bugs by defining clear contracts for the functionality that a class should expose and providing default implementations where you can sensibly abstract code into a base type.
  • 26.
    iv About ThisCourse Module 9, "Managing the Lifetime of Objects and Controlling Resources," introduces the concept of resource management and discusses its importance. This module explains how the .NET Framework simplifies resource management by automatically reclaiming the resources for a managed object when an application no longer references it. This module also explains that the garbage collector does not control unmanaged resources and describes the steps that you can take to dispose of such resources. Module 10, "Encapsulating Data and Defining Overloaded Operators," introduces properties and indexers. These are elements of C# that enable you to encapsulate data and expose data appropriately and efficiently. This module also describes how to implement operators for your types by using overloading. Module 11, "Decoupling Methods and Handling Events," explains how to decouple an operation from the method that implements it and describes how to use anonymous methods to implement decoupled operations. This module also explains how to use events to inform consuming applications of a change or notable occurrence in a type. Module 12, "Using Collections and Building Generic Types," introduces the concept of collection classes and explains that you can use them with greater flexibility than a simple array. This module also introduces generics and explains how to use generic classes to maintain type integrity and avoid the issues that are associated with a lack of type safety. Module 13, "Building and Enumerating Custom Collection Classes," explains how to use the collection classes that the .NET Framework base class library includes. This module also describes how to build custom collection classes. Module 14, "Using LINQ to Query Data," explains how you can use LINQ to abstract the mechanism that an application uses to query data from the application code. This module describes built-in C# LINQ extension methods and LINQ query operators. This module also describes how to build LINQ queries dynamically by using expression trees. Module 15, "Integrating Visual C# Code with Dynamic Languages and COM Components," explains how the .NET Framework 4 enables you to invoke code and components that were written by using other languages from your C# code. It describes how the dynamic language runtime (DLR) enables you to reuse code built by using a wide range of scripting languages, such as Ruby and Python. This module also describes how to invoke COM components from a C# application.
  • 27.
    About This Coursev Course Materials The following materials are included with your kit: • Course Handbook. A succinct classroom learning guide that provides all the critical technical information in a crisp, tightly-focused format, which is just right for an effective in-class learning experience. • Lessons: Guide you through the learning objectives and provide the key points that are critical to the success of the in-class learning experience. • Labs: Provide a real-world, hands-on platform for you to apply the knowledge and skills learned in the module. • Module Reviews and Takeaways: Provide improved on-the-job reference material to boost knowledge and skills retention. • Lab Answer Keys: Provide step-by-step lab solution guidance at your finger tips when it’s needed. • Course Companion CD. Searchable, easy-to-navigate digital content with integrated premium on-line resources designed to supplement the Course Handbook. • Labs: Include complete lab exercise information and answer keys in digital form to use during lab time. • Resources: Include well-categorized additional resources that give you immediate access to the most up-to-date premium content on TechNet, MSDN®, Microsoft Press®. • Student Course Files: Include the Allfiles.exe, a self-extracting executable file that contains all the files required for the labs and demonstrations. Note: To access the full course content, insert the Course Companion CD into the CD- ROM drive, and then in the root directory of the CD, double-click StartCD.exe. • Course evaluation. At the end of the course, you will have the opportunity to complete an online evaluation to provide feedback on the course, training facility, and instructor. To provide additional comments or feedback on the course, send e-mail to support@mscourseware.com. To inquire about the Microsoft Certification Program, send e-mail to mcphelp@microsoft.com.
  • 28.
    vi About ThisCourse Virtual Machine Environment This section provides the information for setting up the classroom environment to support the business scenario of the course. Virtual Machine Configuration In this course, you will use Windows Server® 2008 with Hyper-V™ to perform the labs. The following table shows the role of each virtual machine used in this course. Virtual machine Role 10266A-GEN-DEV Windows 7 Client Software Configuration The following software is installed on each VM: • Visual Studio 2010 Professional Edition • IronRuby • IronPython • SandCastle • HTML Help Workshop • The 2007 Microsoft Office system Course Files There are files associated with the labs in this course. The lab files are located in the folder E:Labfiles on the student computers. Classroom Setup Each classroom computer will have the same virtual machine configured in the same way. Course Hardware Level To ensure a satisfactory student experience, Microsoft Learning requires a minimum equipment configuration for trainer and student computers in all
  • 29.
    About This Coursevii Microsoft Certified Partner for Learning Solutions (CPLS) classrooms in which Official Microsoft Learning Product courseware are taught. This course requires that you have a computer that meets or exceeds hardware level 6, which prescribes the following: • Intel Virtualization Technology (Intel VT) or AMD Virtualization (AMD-V) processor • Dual 120-GB hard disks, 7,200 RM SATA or better (configured as a stripe array) • 4 gigabytes (GB) of RAM expandable to 8 GB or higher • DVD drive • Network adapter • Super VGA (SVGA) 17-inch monitor • Microsoft Mouse or compatible pointing device • Sound card with amplified speakers In addition, the instructor computer must be connected to a projection display device that supports SVGA 1024 × 768 pixels, 16-bit colors.
  • 31.
    Introducing C# andthe .NET Framework 1-1 Module 1 Introducing C# and the .NET Framework Contents: Lesson 1: Introduction to the .NET Framework 4 1-4 Lesson 2: Creating Projects Within Visual Studio 2010 1-16 Lesson 3: Writing a C# Application 1-33 Lesson 4: Building a Graphical Application 1-44 Lesson 5: Documenting an Application 1-58 Lesson 6: Debugging Applications by Using Visual Studio 2010 1-66 Lab: Introducing C# and the .NET Framework 1-78
  • 32.
    1-2 Programming inC# with Microsoft® .Visual Studio® 2010 Module Overview Microsoft® Visual Studio® 2010 and the Microsoft .NET Framework 4 provide a comprehensive development platform to enable you to build, debug, deploy, and manage applications. This module describes the purpose of the .NET Framework 4, and how to build applications by using Visual Studio 2010. Objectives After completing this module, you will be able to: • Explain the purpose of the .NET Framework 4. • Create Microsoft Visual C#® projects by using Visual Studio 2010. • Explain the structure of a Visual C# application. • Use the Windows® Presentation Foundation (WPF) Application template to build a simple graphical application.
  • 33.
    Introducing C# andthe .NET Framework 1-3 • Use XML comments to document an application. • Use the debugger to step through a program.
  • 34.
    1-4 Programming inC# with Microsoft® .Visual Studio® 2010 Lesson 1 Introduction to the .NET Framework 4 This lesson introduces the .NET Framework 4, and describes the key concepts of .NET and some of the tools that are provided to help simplify development. Objectives After completing this lesson, you will be able to: • Describe the purpose of the .NET Framework 4. • Describe the role of Visual C# for writing the code for .NET Framework 4 applications. • Describe the purpose of an assembly. • Explain how the common language runtime (CLR) compiles and runs assemblies. • Describe the tools that the .NET Framework 4 provides.
  • 35.
    Introducing C# andthe .NET Framework 1-5 What Is the .NET Framework 4? Key Points The .NET Framework 4 provides a comprehensive development platform that offers a fast and efficient way to build applications and services. Using Visual Studio 2010, developers can utilize the .NET Framework 4 to create a wide range of solutions that operate across a broad range of computing devices. The .NET Framework 4 provides three principal elements: the CLR, the .NET Framework class library, and a collection of development frameworks. The Common Language Runtime The .NET Framework 4 provides an environment called the CLR. The CLR manages the execution of code and simplifies the development process by providing a robust and secure execution environment that provides common services such as memory management, transactions, interprocess communications, multithreading, and many other features.
  • 36.
    1-6 Programming inC# with Microsoft® .Visual Studio® 2010 The .NET Framework Class Library The .NET Framework 4 provides a library of reusable classes that developers can use to build applications. The classes provide a foundation of common functionality and constructs that help simplify application development and remove the requirement for developers to constantly reinvent logic. For example, the System.IO.File class contains functionality that enables developers to manipulate files on the Windows file system. In addition to using the classes in the .NET Framework class library, you can extend these classes by creating your own libraries of classes. Development Frameworks The .NET Framework 4 provides several development frameworks that you can use to build common types of applications. These frameworks provide the necessary components and infrastructure to get you started. The development frameworks include: • ASP.NET. Enables you to build server-side Web applications. • WPF. Enables you to build rich client applications. • Windows Communication Foundation (WCF). Enables you to build secure and reliable service-oriented applications. • Windows Workflow Foundation (WF). Enables you to build workflow solutions to fulfill the complex business requirements of modern organizations. Question: What is the purpose of the .NET Framework 4, and the three main components that it provides? Additional Reading For more information about the .NET Framework, see the Microsoft .NET page at http://go.microsoft.com/fwlink/?LinkId=192876.
  • 37.
    Introducing C# andthe .NET Framework 1-7 The Purpose of Visual C# Key Points The CLR runs executable code that is generated by using a compiler. You can build applications for the .NET Framework by using any language that has a compiler that can generate executable code in the format that the CLR recognizes. Visual Studio 2010 provides compilers for C++, Visual Basic, F#, and C#. Compilers for other languages are available from a variety of third-party vendors. C# is the language of choice for many developers. It uses a syntax that is very similar to C, C++, and Java, and has several extensions and features that are designed for operation with the .NET Framework. Because of its heritage, many developers who are familiar with other programming languages find C# easy to learn and can be productive very quickly. The C# language has been standardized and is described by the ECMA-334 C# Language Specification. Several vendors apart from Microsoft produce C# compilers. The Microsoft implementation is called Visual C#, and is integrated into Visual Studio. Visual Studio supports Visual C# with a full-featured code editor, compiler, project templates, designers, code wizards, a powerful and easy-to-use debugger, and other tools. C# is also available from Microsoft as Visual C# Express
  • 38.
    1-8 Programming inC# with Microsoft® .Visual Studio® 2010 Edition, which provides a subset of the features that are provided with Visual Studio. Note: C# is an evolving language. Visual C# 2010 uses C# 4.0, which contains several extensions to the C# language that are not yet part of the ECMA standard. Question: Which programming languages have you used? Additional Reading For more information about the Microsoft implementation of Visual C# 2010, see the Visual C# page http://go.microsoft.com/fwlink/?LinkId=192877. For more information about the new features of C# 4.0, see the What's New in Visual C# 2010 page at http://go.microsoft.com/fwlink/?LinkId=192878.
  • 39.
    Introducing C# andthe .NET Framework 1-9 What Is an Assembly? Key Points When you compile a Visual C# application by using Visual Studio 2010, the compiler generates an executable file that the CLR can run. This file is called an assembly. An assembly contains code in an intermediate format called Microsoft intermediate language (MSIL). All compilers for the .NET Framework generate code in this format, regardless of the programming language that was used to write an application. This enables the CLR to run code in the same way, regardless of the language that the developer used. Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, and security. You can think of an assembly as a collection of types and resources that work together and form a logical unit of functionality. An assembly provides the CLR with the information that it needs to be aware of type implementations. An assembly can be of two types: an executable program, or a library that contains executable code that other programs can reuse. By using a library, developers can modularize the development of their applications into logical components.
  • 40.
    1-10 Programming inC# with Microsoft® .Visual Studio® 2010 Typically, when you are distributing assemblies to customers as part of your application, you will want to ensure that the assembly contains versioning information, and that the assembly is signed. Versioning your assemblies is important because ultimately, any applications that you build will have multiple releases. Versioning information can help you identify which versions customers already have and enable you to perform the necessary steps to upgrade the application. Similarly versioning information can also help when documenting and fixing bugs. Signing your assemblies is equally important because it ensures that your assembly cannot easily be modified or replaced by an alternative implementation from a malicious source, and because it gives the assembly a strong name. Information such as the assembly version and security identity is stored as metadata in an assembly manifest. The manifest also contains metadata that describes the scope of the assembly, and any references to classes and resources. The manifest is typically stored in a portable executable (PE) file. Assembly Versioning Assembly version information is stored in the assembly manifest and is used with the assembly name and culture to derive the assembly’s identity. An assembly version number consists of the following: • Major version number • Minor version number • Build number • Revision number Assembly Signing Assembly signing is an important step that developers should include in their build process because it provides the following benefits: • It protects assemblies from modification. • It enables you to include the signed assembly in the Global Assembly Cache (GAC), so you can share the assembly with multiple applications. • It guarantees that the name of the assembly is unique. • To sign your assembly, you can use the Sign Tool that is provided with the .NET Framework, or you can use the assembly-signing functionality in Visual Studio 2010.
  • 41.
    Introducing C# andthe .NET Framework 1-11 Question: Why would you choose to distribute an assembly rather than distribute the source code? Additional Reading For more information about the purpose and features of assemblies, see the Assemblies in the Common Language Runtime page at http://go.microsoft.com/fwlink/?LinkId=192879. For more information about assembly versioning, see the Assembly Versioning page at http://go.microsoft.com/fwlink/?LinkId=192880. For more information about assembly signing, see the SignTool.exe (Sign Tool) page at http://go.microsoft.com/fwlink/?LinkId=192881.
  • 42.
    1-12 Programming inC# with Microsoft® .Visual Studio® 2010 How the Common Language Runtime Loads, Compiles, and Runs Assemblies Key Points Assemblies contain MSIL code, which is not executable. When you run a .NET Framework application, the CLR loads the MSIL code from an assembly and converts it into the machine code that the computer requires. The CLR is a fundamental component of the .NET Framework. It handles code execution and provides useful services for application development. The CLR contains several components that perform the following tasks when you run a .NET Framework application: 1. The Class Loader locates and loads all assemblies that the application requires. The assemblies will already be compiled into MSIL. 2. The MSIL-to-native compiler verifies the MSIL code and then compiles all assemblies into machine code ready for execution.
  • 43.
    Introducing C# andthe .NET Framework 1-13 Note: The CLR performs the verification step because it is possible to write your own MSIL code. If you use a C# compiler, the MSIL code will be valid, but the CLR cannot make any assumptions. 3. The Code Manager loads the executable assembly and runs the Main method. 4. The Garbage Collector provides automatic lifetime memory management of all objects that your application creates. The Garbage Collector disposes of any objects that your application is no longer using. 5. The Exception Manager provides structured exception handling for .NET applications, which is integrated with Windows structured exception handling. Question: What steps does the CLR perform when you run your application?
  • 44.
    1-14 Programming inC# with Microsoft® .Visual Studio® 2010 What Tools Does the .NET Framework Provide? Key Points The .NET Framework provides several tools to help simplify the development of .NET applications. The following table describes some of the key tools. Tool Description Code Access Security Policy Tool (Caspol.exe) Enables users to modify the machine, user, and enterprise security policy. This can include defining a custom permission set and adding assemblies to the full trust list. Certificate Creation Tool (Makecert.exe) Enables users to create x.509 certificates for use in their development environment. Typically, you can use these certificates to sign your assemblies and define Secure Sockets Layer (SSL) connections. Global Assembly Cache Tool (Gacutil.exe) Enables users to manipulate the assemblies in the GAC. This can include installing and uninstalling assemblies in the GAC so that multiple applications can access them.
  • 45.
    Introducing C# andthe .NET Framework 1-15 Tool Description Native Image Generator (Ngen.exe) Enables users to improve the performance of .NET applications. The Native Image Generator improves performance by precompiling assemblies into images that contain processor-specific machine code. The CLR can then run the precompiled images instead of using just-in-time (JIT) compilation. Alternatively, if you use JIT compilation, your code is compiled just before it is executed. MSIL Disassembler (Ildasm.exe) Enables users to manipulate assemblies, such as determining whether an assembly is managed, or disassembling an assembly to view the compiled MSIL code. Strong Name Tool (Sn.exe) Enables users to sign assemblies with strong names. The Strong Name Tool includes commands to create a new key pair, extract a public key from a key pair, and verify assemblies. Question: You have created two applications that both use an assembly called Contoso.ReportGenerator.dll. Both applications will run on the same machine. What is the best approach to share the Contoso.ReportGenerator.dll assembly and which tool would you use? Additional Reading For more information about the tools that the .NET Framework provides, see the .NET Framework Tools page at http://go.microsoft.com/fwlink/?LinkId=192882.
  • 46.
    1-16 Programming inC# with Microsoft® .Visual Studio® 2010 Lesson 2 Creating Projects Within Visual Studio 2010 This lesson introduces you to Visual Studio 2010 and describes how it can help simplify the development of .NET applications through the use of predefined application templates, and features of the integrated development environment (IDE). Objectives After completing this lesson, you will be able to: • Describe the features that are available in Visual Studio 2010 that aid programming productivity. • Describe the various project types that Visual Studio 2010 supports and when to use them. • Describe the primary files that are found in most Visual Studio solutions.
  • 47.
    Introducing C# andthe .NET Framework 1-17 • Explain how to create a console application by using the Console Application template in Visual Studio 2010. • Use Visual Studio to compile and run an application.
  • 48.
    1-18 Programming inC# with Microsoft® .Visual Studio® 2010 Key Features of Visual Studio 2010 Key Points Visual Studio 2010 presents a single development environment that enables you to rapidly design, implement, build, test, and deploy various types of applications and components by using a range of programming languages. Some of the key features of Visual Studio 2010 are: • Intuitive integrated development environment. The Visual Studio 2010 IDE provides all of the features and tools that are necessary to design, implement, build, test, and deploy applications and components. • Rapid application development. Visual Studio 2010 provides design views for graphical components that enable you to build complex user interfaces easily. Alternatively, you can use the Code Editor views, which provide more control. Visual Studio 2010 also provides wizards that help speed up the development of particular components.
  • 49.
    Introducing C# andthe .NET Framework 1-19 • Server and data access. Visual Studio 2010 provides the Server Explorer, which enables you to log on to servers and explore their databases and system services. It provides a familiar way to create, access, and modify databases that your application uses. • Debugging features. Visual Studio 2010 provides a debugger, which enables you to step through local or remote code, pause at breakpoints, and follow execution paths. • Error handling. Visual Studio 2010 provides the Error List window, which displays any errors, warnings, or messages that are produced as you edit and build your code. • Help and documentation. Visual Studio 2010 also provides help and guidance through Microsoft IntelliSense®, code snippets, and the integrated help system, which contains documentation and samples. Question: What are the main reasons why you may choose Visual Studio 2010 over a text editor such as Notepad++?
  • 50.
    1-20 Programming inC# with Microsoft® .Visual Studio® 2010 Templates in Visual Studio 2010 Key Points Visual Studio 2010 supports the development of different types of applications such as Windows-based client applications, Web-based applications, services, and libraries. To help you get started, Visual Studio 2010 provides several application templates that provide a structure for the different types of applications. These templates: • Provide starter code that you can build on to quickly create a functioning application. • Include supporting components and controls that are relevant to the project type. • Configure the Visual Studio 2010 IDE to the type of application that you are developing. • Add references to any initial assemblies that this type of application usually requires.
  • 51.
    Introducing C# andthe .NET Framework 1-21 Types of Templates The following table describes some of the common application templates that you can use when you develop .NET Framework applications by using Visual Studio 2010. Template Description Console Application Provides the environment settings, tools, project references, and starter code to develop an application that runs in a command-line interface. This type of application is considered lightweight compared to the Windows Forms application template because there is no graphical user interface. WPF Application Provides the environment settings, tools, project references, and starter code to build a rich graphical Windows application. A WPF application enables you to create the next generation of Windows applications, with much more control over user interface design. Class Library Provides the environment settings, tools, and starter code to build a .dll assembly. You can use this type of file to store functionality that you might want to invoke from many other applications. Windows Forms Application Provides the environment settings, tools, project references, and starter code to build a graphical Windows Forms application. ASP.NET Web Application Provides the environment settings, tools, project references, and starter code to create a server-side, compiled ASP.NET Web application. ASP.NET MVC 2 Application Provides the environment settings, tools, project references, and starter code to create a Model-View- Controller (MVC) Web application. An ASP.NET MVC Web application differs from the standard ASP.NET Web application in that the application architecture helps you separate the presentation layer, business logic layer, and data access layer. Silverlight Application Provides the environment settings, tools, project references, and starter code to build a rich, graphical Web application.
  • 52.
    1-22 Programming inC# with Microsoft® .Visual Studio® 2010 Template Description WCF Service Application Provides the environment settings, tools, project references, and starter code to build Service Orientated Architecture (SOA) services. Question: What project templates would you use for each of the following: • A client application that will run on a Windows-based computer. • A library of functionality that you want to use in other applications. • A Web site that you will host on an Internet Information Services (IIS) Web server.
  • 53.
    Introducing C# andthe .NET Framework 1-23 The Structure of Visual Studio Projects and Solutions Key Points Visual Studio 2010 uses solutions and projects as conceptual containers to organize your source files during development. Categorizing your source files in this way simplifies the build and deployment process for your .NET Framework applications. Visual Studio Projects A project is used to organize source files, references, and project-level configuration settings that make up a single .NET Framework application or library. When you create a project in Visual Studio, the project is automatically organized into a solution. The following table describes some of the common file types that you will find in a Visual Studio project.
  • 54.
    1-24 Programming inC# with Microsoft® .Visual Studio® 2010 File Description .cs Code files that can belong to a single project solution. This type of file can represent any of the following: • Modules • Windows Forms files • Class files .csproj Project files that can belong to multiple project solutions. The .csproj file also stores settings for the project, such as the output path for the build output and the target platform. .aspx Files that represent ASP.NET Web pages. An ASP.NET file can contain your Visual C# code or you can use an accompanying .aspx.cs file to store your code in addition to the page markup. .config Configuration files are XML-based files that you can use to store application-level settings such as database connection strings, which you can then modify without recompiling your application. .xaml XAML files are used in WPF and Microsoft Silverlight® applications to define user interface elements. Visual Studio Solutions A single Visual Studio solution is a container for one or more projects. By default, when you create a new project, Visual Studio automatically creates a solution for the project. You can add additional projects to a solution. This is useful if, for example, you are building a library assembly and an application that tests this library. You can build and compile both projects as part of the same solution rather than having to run multiple instances of Visual Studio. A solution can also contain project-independent items that any of the projects in the solution can use. For example, an ASP.NET solution can contain a single cascading style sheet (.css) file that applies a standard look and feel to any of the included ASP.NET projects. Categorizing multiple projects into a single Visual Studio solution provides the following advantages: • It enables you to work on multiple projects within a single Visual Studio 2010 session. • It enables you to apply configuration settings globally to multiple projects.
  • 55.
    Other documents randomlyhave different content
  • 56.
    [I-68] Frontenac toRed Wing, some 13 miles by present channel, whence it is a couple of miles further to the head of the island opp. Cannon r. camp. Pike coasts the Minnesota shore till he finishes with the lake at the mouth of Bullard's or Ida cr., a streamlet that makes in at a town called after the chief Wakouta, Wacouta, Wakuta, etc. Here he enters one of the channels by which the Mississippi finds its way into the lake, no doubt the middle one, then as now the main one, which, however, soon joins the south one; the north channel is narrower, crookeder, shoaler, and connected with some expansions known as Upper and Lower lakes and Goose bay. The town of Red Wing is situated on the S. side of a sharp bend the river makes in coming from the Cannon, on a plain under bluffs that nearly encompass the town; one of these is specially notable as the isolated elevation forming a conspicuous landmark on the very brink of the river. This is Barn bluff, or Barn mountain, so named by tr. of F. La Grange; it is ¾ of a mile long and 345 feet above low water mark; "upon the highest point of the Grange. Major Long, who ascended it in 1817, observed an artificial mound, whose elevation above its base was about five feet," Keating, I. p. 296. Nicollet made the altitude 322 feet, with commendable caution; Owen gave 350 feet, almost correctly. This word Grange is often found as Gange: thus Beltrami has in text, p. 189, mountain of the Gange, and Gange
  • 57.
    r.; latter alsoon map, and I suppose Ganges r. could be found, even at this distance from India. About the mouth of Cannon r., opp. Pike's camp, there was a place called Remnichah; both Nicollet and Owen chart Remnicha r. or cr. as a stream falling in close to the mouth. While Remnicha or Hhemnicha was a name of Red Wing's village, it also covered the whole tract from Barn bluff to Cannon r. Mr. A. J. Hill informs me of "a small ravine or coulée which ran through Red Wing's village, and in 1854, when I lived there, was called the Jordan. It only headed a few blocks back, and is now doubtless a sewer or filled up." So Nicollet's Remnicha r. is that now known as Hay cr., above which a certain Spring cr. makes in on the same side. Present town of Trenton, Pierce Co., Wis., is about a mile above camp. [I-69] Discovery of the St. Croix r. is commonly attributed to Accault's party, already mentioned as consisting of himself, Auguelle, and Hennepin, prisoners in the hands of the Sioux at the time. The date is 1680; day in question. According to La Salle's letter of Aug. 22d, 1682, written at Fort Frontenac, in Margry's Relations, II. p. 245 seq., it was very shortly after the 22d of April, 1680, when the Indians who were carrying them off had come up the Mississippi to 8 leagues below the falls of St. Anthony, and then determined to finish their journey by land to their village at Mille Lacs. As the St. Croix is more than 24 m. below Minneapolis, this party must have passed its mouth about the date said. The Memoir of Le Sieur Daniel Greysolon Du Luth to the Marquis of Seignelay, 1685 (Archives of the Ministry of the Marine), states that in June, 1680, he entered a river 8 leagues from the end of Lake Superior, ascended it, made a half league portage, and fell into "a very fine river," which took him to the Mississippi r. This was the St. Croix,
  • 58.
    which Du Luththus certainly descended to its mouth at that time. He heard of the captivity of his countrymen with indignation and surprise, hired a Sioux to show him where they were, and rescued them; he says that he put them in his canoes and carried them to Michelimakinak, whence, after wintering there, they set out for the settlements Mar. 29th, 1681. It is quite possible that before the great triangular duel which La Salle, Du Luth, and Hennepin managed to arrange among themselves over the operations of 1680, the St. Croix was seen by the missionary Menard, who in 1661 may have reached the Mississippi by way of the St. Croix or some other way, and was soon after lost. Marquette is not in question here, as he came by the Wisconsin to the Mississippi and went down the latter. So with any other person who reached the Mississippi prior to 1680. Excepting the Menard matter, which is uncertain, the case narrows to Accault's party and Du Luth, within some weeks of each other, late spring and early summer of 1680; the facts appear to be that the former first passed the mouth of the St. Croix, and the latter first descended this river. Hennepin first named the river R. de Tombeau, Descr. Louis., 1683, map; this is translated Tomb r., as, e. g., Shea's Hennepin, 1880, p. 199, where we read: "Forty leagues above [Chippewa r.] is a river full of rapids, by which, striking northwest [read N. E.], you can proceed to Lake Condé [L. Superior], as far as Nimissakouat [in Margry Nemitsakouat, in the Nouv. Déc. Nissipikouet, being the Bois Brûlé] river, which empties into that lake. This first river is called Tomb river because the Issati [Sioux] left there the body of one of their warriors, killed by a rattlesnake, on whom, according to their custom, I put a blanket." Some translate Grave r. On Franquelin's map, 1688, the St. Croix is lettered R. de
  • 59.
    la Magdelaine, thougha certain Fort St. Croix appears about its head; by whom it was first called Magdalene r. I am not informed. Lahontan's map shows nothing here; he was too full of his fabulous Long r. to concern himself much with real rivers. Next come Lesueur and his people, 1695; he had first reached the Mississippi in 1683, and on this his second appearance (his third being in 1700) they built the trading-house called Fort Lesueur on Pelée isl., just below the mouth of the St. Croix, as already noted. His editor, so far as this trip is concerned, is the clever carpenter Penicaut, a sensible, fair-and-square man. Just here comes in the question of the first application of the name St. Croix. The river was already so called and the name in use before 1700; thus, Nicolas Perrot's prise de possession, a document dated at Fort St. Antoine, May 8, 1689, mentions the Rivière-Sainte-Croix. The Carte du Canada ou de la Nouvelle France, par Guillame de L'Isle, Paris, 1703, traces the river and letters it "L. & R. Ste. Croix," i. e., as some have translated it, Lake and River Holy Cross; said lake being, of course, the dilation of the same bottle-nosed river, which issues from a contracted orifice, but is a mile or two wide higher up. But whatever the theological proclivity to suppose this name to have been given for the usual instrument of the execution of Roman malefactors, later put by the Emperor Constantine on his banner, and afterward used for other purposes, it is certain that the Christian crucifix is not directly implied in the name. It is a personal designation, connoting one Sainte Croix or Saint Croix, a trader named in La Harpe's MSS. of Lesueur's third voyage as a Frenchman who had been wrecked there; for we read: "September 16 he [Lesueur] passed on the east a large river called Sainte-Croix, because a Frenchman of that name was shipwrecked at its mouth." Hennepin
  • 60.
    names Sainte Croixas one of six men who deserted La Salle. A letter written in June, 1684, by Du Luth to Governor De la Barre (who succeeded Frontenac in 1682), states that the writer had met one Sieur de la Croix and his two companions. This case resembles those of La Crosse r. already noted, and St. Pierre r., noted beyond. It may be summed in the statement that St. Croix r., St. Pierre r., and Lake Pepin, were all three so named for persons, by Lesueur or his companions, not earlier than 1683 and not later than 1695; best assignable date, 1689. The river has also been called Hohang or Fish r. (cf. Sioux Hogan-wanke- kin). The character of St. Croix's r. as a waterway to the Great Lakes is elsewhere discussed. This stream now forms the boundary between Wisconsin and Minnesota from its mouth to beyond 46° N., where it splits up into small streams in Burnett Co., Wis. Its general course is not far from S.—it is due S. for many miles before it falls into the Mississippi; which latter, for a great distance above their confluence, has a general bearing S. E. Immediately at the mouth of the St. Croix, on the E., is Prescott, Pierce Co., Wis., the site of which was once recommended by Long for a military post; on the W. is Point Douglas, Washington Co., Minn.; and across the Mississippi, a very little higher up, is Hastings, seat of Dakota Co., Minn., at the mouth of Vermilion r. The above-mentioned dilation of the river into Lake St. Croix extends some 30 m. up from its mouth; and as far above this lake as an Indian ordinarily paddled his canoe in a day was the long-noted Sioux-Chippewa boundary, at a place which became known as Standing Cedars. Thus the river did duty in Indian politics before it set bounds to our Minnesota and Wisconsin. This lake was often called Lower St. Croix l., in distinction from the sizable body of water at the head of the river known as Upper
  • 61.
    St. Croix l.For the route thence by Burnt r. to Lake Superior, see a note beyond. [I-70] Especially as it leaves us in the lurch for mileage of the 19th. But we can easily overhaul him before he gets to St. Paul, which is only 30 river-miles from Prescott (mouth of St. Croix r.). He did not go far above this river; for he makes it 26½ + 8 = 34½ m. to the Sioux village, which latter was close to the present city limits of St. Paul. If we must set a camp for him, it may be assigned to Hastings, Dakota Co., Minn., 2½ m. above Prescott, Pierce Co., Wis., and 18½ m. below Newport, Washington Co., Minn., in the vicinity of which he will camp to-morrow. "Tattoo," at which the blunderbuss was fired, is not a place, as the context and capitalization might suggest, but a certain military call which is habitually sounded in garrisons and camps in the evening before taps. It marks the hour when the soldiers are supposed to retire to their quarters for their devotions before the lights are put out at taps, and when the officers settle down in earnest for the night's poker. In approaching the St. Croix from his camp opposite Cannon r., Pike has bluffs off his right nearly all the way, and the town of Diamond Bluff, Pierce Co., Wis., is at the point where they first reach to the river, a mile and a half above the mouth of Trimbelle r., right, and 11 m. below Prescott. On the left the bluffs are off the river all the way, and for most of this distance Vermilion slough, running under the bluffs, cuts off an island 11 m. long and at its widest near 3 m. broad. The lower outlet of the slough is below Trimbelle r.; the middle opening is only 3 m. below Prescott; the upper one is at Hastings. The bottom-land of the principal island has several bodies of water, one of them called Sturgeon l., discharging separately from the main slough; and is
  • 62.
    traversed lengthwise bya sand-bank 6 m. long, which may be called Lesueur's Terrace. For this Prairie or Bald isl. is no doubt that formerly known as Isle Pelée, on which was built Fort Lesueur, 1695. The middle opening of Vermilion slough is in common with a lower outlet of Vermilion r. This is Rapid r. of Long, and Rivière Jaune of the French; "R. Jaune" appears on Franquelin's map, 1688. The upper discharge of this river is at Hastings, and thus above the mouth of the St. Croix; Lake Isabel is a small sheet between the river and the town. The Minnesota county line between Goodhue and Dakota strikes the Mississippi just 1¼ m. below the lower mouth of Vermilion r. At the mouth of the St. Croix the Mississippi ceases or rather begins to separate Wisconsin from Minnesota; so that henceforth Pike proceeds in the latter State. [I-71] Hastings to Newport, 18½ m. by the channel; camp a mile and a half beyond this, vicinity of present Red Rock, Washington Co., at the point on the small strip of prairie where the Sioux had their celebrated red medicine-stone; this was the "large painted stone" Pike observed. It gave name to Red Rock, having meanwhile become a historical object. We read in Long, I. p. 287: "a stone which is held in high veneration by the Indians on account of the red pigment with which it is bedawbed, it is generally called the painted stone.... It is a fragment of syenite, which is about four and a half feet in diameter.... The Indians frequently offer presents to the Great Spirit near this stone," etc. The party found near the stone an eagle's feather, roots of Psoralea esculenta, and willow sticks painted red; they secured a fragment of the idol for their mineralogical collection. At the time of this visit (1823) there was an Indian burying-ground a short distance above—in sight from the spot—if that
  • 63.
    place can becalled a burying-ground where the bodies are not buried in the ground but scaffolded in the air; a mode of disposition of the dead which might be called hypsitaphy, in distinction from bathytaphy or ordinary underground interment. See Pike's remarks on Sioux burial on the 21st. To reach the sacred spot, hallowed by association with the deepest religious emotions of the untutored aboriginal mind, Pike left Hastings, where the river was bridged by the C., M. and St. P. R. R. in 1871 (Act of Minn. Legisl., Feb. 7th, 1867), and soon passed the site of Nininger, Dakota Co., a small town built at the lower point of a steep bluff which fronts the river's edge on the S., at the mouth of the rivulet which serves as the upper discharge of Lake Rebecca or King l.—in fact the whole bottom on his left is an island 2¾ m. long, extending from Hastings to Nininger, being cut off by the slough of which King l. is a dilation. On the right, in Washington Co., bluffs front the river for a mile or more, to the lower opening of Boulanger slough, which cuts off an island 2½ m. long. The immediate frontage of the Nininger bluffs on the river is less than a mile, for they recede at the lower opening of Nininger slough. The river thus winds from side to side of its bed, with alternation of bluffs and bottom on each side. Above Nininger slough the river makes a great loop to the left; the whole irregular curve is subtended on the right by Grey Cloud slough, about 4 m. long direct, and longer by its meanders, thus cutting off Grey Cloud isl., of the same length, and over 2 m. wide in some places; town site Grey Cloud, Washington Co., on the river bank on this island, which also presents at its northern end a limestone rock, 50 to 75 feet above low-water mark, and a mile or more long; this is probably the Medicine Wood of Forsyth, 1819. Near the middle of the loop, on the other side, is
  • 64.
    the nominis umbrasite of Pine Bend, Dakota Co., where the river runs under the hills. This loop was formerly called Détour de Pin or des Pins, whence its modern names Pine bend and Pine turn. The hills border the river pretty closely for 5 m. further, to Merrimac, opposite which is an island of the same name; within 1½ m. of this on the right hand, opposite an island of its own name, is Newport, Washington Co. [I-72] Newport to St. Paul—to a steamboat ldg. about the foot of Wabasha or Robert st.—is 8½ m. by the channel, and considerably more than halfway up to Pike's camp on the island at the mouth of St. Peter's or the Minnesota r. Thus, though Pike calls to-day's voyage "24 miles," it is nearer 14. One who then swept around the bold bend of the river at St. Paul saw a germ of that great metropolis in the humble Sioux village, though only prescience could have divined what time would make of the site above it. A later account than Pike's is given in Keating's Long's Exp. of 1823, pub. 1824, I. p. 289: "Passed an Indian village consisting of ten or twelve huts, situated at a handsome turn on the river, about 10 miles below the mouth of the St. Peter; the village is generally known by the name of the Petit Corbeau, or Little Raven, which was the appellation of the father and grandfather of the present chief. He is called Chetanwakoamene (the good sparrow-hunter). The Indians designate this band by the name of Kapoja, which implies that they are deemed lighter and more active than the rest of the nation." This was a band of Mdewakantonwan Sioux (the Minowa Kantong of Pike), for which, as well as for the celebrated chief himself, see notes beyond. The term which Keating renders Kapoja is now Kaposia, as a designation of the locality
  • 65.
    of South Park,a place on the west bank of the river; but the old Sioux village was on the east bank, below Frenchman's bar, in the low ground formerly called by the French Grand Marais, rendered by Beltrami Great March (for Great Marsh, II. p. 197), and now rejoicing in the epithet of Pig's Eye marsh or lake. Pig's Eye was the soubriquet of one Peter Parrant, a whisky-seller who squatted on the bottom in 1838, below Carver's Cave in the Dayton bluff. The whole region about the mouth of St. Peter's r. had been a Sioux focus and stamping-ground for generations before any of the localities thereabouts received names from us. The curious origin of the name St. Paul for the present capital was in this wise: The limits of the military reservation about Fort Snelling were authoritatively fixed in 1839. The whisky-traders, loafers, and squatters about the place became so troublesome that the U. S. Marshal of Wisconsin was directed to remove all such intruders, who were given till next spring to decamp; and on May 6th, 1840, the troops were called out to complete the eviction by the destruction of cabins. In the words of E. D. Neill, Minn. Hist. Soc., II. Part 2, 1864, 2d ed. 1881, p. 142: "The squatters then retreated to the nearest point below the military reserve, and there they became the inglorious founders of a hamlet, which was shortly graced with the small Roman Catholic chapel of St. Paul, the name of which is retained by the thrifty capital of Minnesota, which has emerged from the groggeries of 'certain lewd fellows of the baser sort.'" The chapel above mentioned was built by Rev. Lucian Galtier, on what is now Catholic block; it fronted on Bench street. It was dedicated Nov. 1st, 1841. The first marriage bans were those of one Vital Guerin, described as "a resident of St. Paul;" and thus the priest named the place as well as the house, although it was also called for a time St.
  • 66.
    Paul Landing, becausesome stores had been put up close by, which caused steamboats to stop there. In 1848, when Minnesota acquired Territorial organization, and the capital was fixed at St. Paul, no such place could be found on ordinary maps; it was some obscure settlement, supposed to be somewhere about the mouth of St. Peter's r., or in the vicinity of St. Anthony's falls, perhaps at a place known as White Rock, or Iminijaska, where some bluffs were more easily discernible than any village. Even down to 40 years ago, or a little before 1858, when Minnesota acquired statehood, St. Paul had only replaced tepees with a sprinkling of log cabins; and people scrambled up the bluff by digging their toes into the ground. The site of the city is one which would hardly have been anticipated as such; nor would the original features of the locality be easily recognized now after all the grading and terracing that has been done to convert the stubborn hills and intractable hollows into a beautiful city of over 190,000 inhabitants. But all this was to be, and is well worth all that it cost. Among the natural features which should be noted in this connection, especially as they have given rise to conflicting historical statements, are Carver's Great Cave in Dayton's bluff, and Nicollet's New (Fountain) Cave, halfway thence to Fort Snelling; but for these, as well as for a third cave close to Carver's, see a note beyond, at date of Apr. 12th, 1806, when Pike's text brings the matter up. [I-73] Jean Baptiste Faribault, b. Berthier, Lower Canada, 1774, d. Faribault, Minn., Aug. 20th, 1860, being at the time the oldest white resident of the present State. Jean Baptiste was the youngest one of 10 children of Bartholomew (who was b. in Paris and came to Canada in 1754); he was in business in
  • 67.
    Quebec 1790-97, atthe latter date entered the employ of J. J. Astor as an agent of the N. W. Co., and was engaged in the Indian trade at various points in the Mississippi region for about 50 years, for the most part on his own account. One of the posts he established was at the mouth of the Minnesota r., where Pike found him. In 1814 he married a half-breed daughter of Major Hause (then Superintendent of Indian Affairs), by whom he had eight children. His Indian name was Chahpahsintay, meaning Beaver Tail. His eldest son, Alexander, founded the present town of Faribault, Minn. Mr. J. B. Faribault "espoused the cause of the U. S. during the war of 1812, and lost many thousand dollars thereby, as well as narrowly escaping with his life on several occasions. He labored all his life to benefit the red man, teach him agriculture and the arts of industry, and protect his interests. He had an unbounded influence over them; his advice was never disregarded. He was prominent at all treaties, and rendered the U. S. many valuable services," says J. F. Williams, Minn. Hist. Coll., I. 2d ed. 1872, p. 377: see also ibid., p. 468. An extended memoir of Faribault, by General H. H. Sibley, occupies pp. 168-79 of III. of the Minn. Hist. Coll., 1874. [I-74] The history of the discovery of St. Peter's r., off the mouth of which Pike is now camped, is involved in some obscurity, which modern research has not wholly cleared up, though the main facts have probably been certified. (1) It has been conceded since Carver's time that Hennepin missed the river. Discovery has not been traced back of Lesueur's time. Lesueur was first on the Mississippi hereabouts in 1683; next in 1695, when he built on Pelée isl., just below the St. Croix; and again in 1700; both these rivers are noted in the treatise of Nicolas Perrot, and before 1700 the river of
  • 68.
    St. Pierre hadbeen so named. (2) Charlevoix's account, Hist. N. Fr., Paris, 1744, IV. pp. 165, 166, is in substance: In 1700 Lesueur, sent by D'Iberville to establish himself in the Sioux country and take possession of a copper-mine que le Sueur y avait découverte, had already discovered there, some time before; ascended St. Peter 40 leagues to Rivière Verte (now Blue Earth r.) which comes in on the left hand as you go up; ascended this Green r. 1 league; built a fort and wintered there, 1700-1; in April, "1702," for which read 1701, went up Green r. ¾ league to his mine and in 22 days got out over 30,000 lbs. of ore, of which 4,000 selected lbs. were sent to France; there was a mountain of this mineral 10 leagues long, etc. (3) The Amer. Philos. Society's copy of the MS. of Bénard de la Harpe is carefully digested by Keating in Long's Exp., I. pp. 317-322. This MS. is entitled: "Journal historique concernant l'établissement des Français à la Louisianne, tiré des mémoires de Messrs. d'Iberville et de Bienville, etc., par M. Bénard de la Harpe." The original of this copy was in the hands of Dr. Sibley, who certifies to the correctness of the copy in a note annexed, dated Natchitoches, Oct. 29th, 1805. Some of the contents of this MS. are: (a) Lesueur and d'Iberville, with 30 hands, reached the mouth of the Mississippi Dec., 1699. Lesueur was sent there by M. l'Huillier, fermier général, under orders to establish himself at a place near the sources of the Mississippi, where he had previously discovered a green ore, i. e., in 1695. The substance of the 1695 discovery is: Lesueur built a fort on an island (Isle Pelée, now Prairie isl.) in the Mississippi over 200 m. above the Illinois, by order of Count Frontenac; and the same year he went to Montreal with the Chippewa chief Chingouabé and the Sioux chief Tioscaté, the latter the first of his nation that ever was in Canada, and
  • 69.
    received very kindlyby the authorities in view of what they hoped to make out of his country. With this Sioux chief Lesueur had intended to reascend the Mississippi in 1696; but the former died at Montreal after 33 days' illness. Lesueur, thus released from an obligation to go back with the chief to the country where he had discovered the ore, determined to go to France to ask leave to open mines; this voyage he made, and had his permit in 1697. June, 1697, he embarked at La Rochelle for Canada; was captured by the British on the Newfoundland banks and carried to Portsmouth; after peace, returned to Paris for a new commission, which was issued to him in 1698; went to Canada with this; various obstacles threw him back to Europe; and meanwhile part of the men whom he had left in charge in 1695 abandoned their posts and proceeded to Montreal. Thus operations on the mines were suspended from 1695 to 1700, for Lesueur and d'Iberville, with their 30 workmen, as we have seen, only reached the mouth of the Mississippi in Dec., 1699. (b) The MS. we are following states, under date of Feb. 10th, 1702, that Lesueur was that day come to the mouth of the Mississippi with 2000 quintaux of blue and green earth. This he certainly had got on his tour of Dec., 1699-Feb., 1702, from and back to the mouth of the Mississippi, and he had got it from the mine he opened and worked on Rivière Verte or Blue Earth r., the principal branch of St. Peter's. The MS. contains a narrative of this tour from July 12th to Dec. 13th, 1700. It appears that Lesueur moved as follows: July 13th, mouth of the Missouri; Sept. 1st, mouth of the Wisconsin; Sept. 14th, mouth of the Chippewa (on one of whose branches he had found a 60-lb. mass of copper during his previous journey); same day, Lake Pepin, so designated in the MS.; 16th, passed La Croix r., so called from a Frenchman wrecked there; 19th,
  • 70.
    entered St. Peter'sr.; Oct. 1st had ascended this for 44¼ leagues, and then entered Blue r., so called for the color of the earth on its banks; started an establishment at or more probably near the mouth of Blue r., at what the MS. gives as lat. 44° 13´ N.; Oct. 14th, finished the works, which were named Fort L'Huillier; Oct. 26th, went to the mine with three canoes, which he loaded with colored earth taken from mountains near which were mines of copper, samples of which L'Huillier had assayed at Paris in 1696. Lesueur wintered there, 1700-1, and, as we have seen, was back to the mouth of the Mississippi Feb. 10th, 1702. (c) From these historical data Keating in Long, 1823, I. p. 320, infers that St. Peter's and the Blue (Blue Earth) rivers were those streams which Lesueur had ascended in 1695, which date is consequently assigned to the discovery, without reference back to 1683. This inference is made "from the circumstance that they are mentioned as well known, and not as recently discovered; and more especially from the observation of la Harpe, that the eastern Sioux having complained of the situation of the fort [L'Huillier], which they would have wished to see at the confluence of the St. Peter and Mississippi, M. le Sueur endeavoured to reconcile them to it. 'He had foreseen,' says la Harpe, 'that an establishment on the Blue river would not be agreeable to the eastern Sioux, who are the rulers of all the other Sioux, because they were the first with whom the French traded, and whom they provided with guns; nevertheless, as this undertaking had not been commenced with the sole view of trading for beavers, but in order to become thoroughly acquainted with the quality of the various mines which he had previously discovered there [italics Keating's], he replied to the natives that he was sorry he had not been made
  • 71.
    sooner acquainted withtheir wishes, &c., but that the advanced state of the season prevented his returning to the mouth of the river.' No mention is made in this narrative of the stream being obstructed with ice, a circumstance which, had it really occurred, would, we think, have been recorded by de la Harpe, who appears to have been a careful and a curious observer, and who undoubtedly saw le Sueur's original narrative." (4) On the foregoing data Nicollet, Rep. 1843, p. 18, has some judicious remarks in fixing Lesueur's locality with precision: "On the left bank of the Mankato [Green, Blue, or Blue Earth r.], six miles from its mouth, in a rocky bluff composed of sandstone and limestone, are found cavities in which the famed blue or green earth, used by the Sioux as their principal pigment, is obtained. This material is nearly exhausted, and it is not likely that this is the spot where a Mr. Lesueur (who is mentioned in the Narrative of Major Long's Second Expedition, as also by Mr. Featherstonhaugh) could, in his third voyage, during the year 1700, have collected his 4000 pounds of copper earth sent by him to France. I have reason to believe that Lesueur's location is on the river to which I have affixed his name, and which empties into the Mankato three-quarters of a league above Fort L'Huillier, built by him and where he spent a winter. This location corresponds precisely with that given by Charlevoix, whilst it is totally inapplicable to the former. Here the blue earth is abundant in the steep and elevated hills at the mouth of this river, which hills form a broken country on the right side of the Mankato. Mr. [J. C.] Fremont and myself have verified this fact: he, during his visit to Lesueur river; and I, upon the locality designated by Mr. Featherstonhaugh, where the Ndakotahs formerly assembled in great numbers to collect it, but to which they now seldom
  • 72.
    resort, as itis comparatively scarce—at least so I was informed by Sleepy-eye, the chief of the Sissitons, who accompanied me during this excursion." (5) Featherstonhaugh's remarks, Canoe Voyage, etc., I. p. 280 and p. 304, seem to me less judicious than likely to make the judicious grieve; in fine, they are singularly obtuse to have come from so British a man and so clever a story-teller. He heads a page in caps, "The Copper-mine, a Fable;" he has in text, "finding the copper-mine to be a fable"; again: "that either M. le Sueur's green cupreous earth had not corresponded to the expectations he had raised, or that the whole account of it was to be classed with Baron Lahontan's" fables, etc. This sort of talk would befog the whole subject, were it not obvious that it has no bearing whatever upon the historico-geographical case we are discussing. The question is where Lesueur went, and when he got there—not at all what he found there. It is obtuse, I say, because unintentionally misleading, for F'gh to say that, when he reached the bluff whence the pigment had been taken, "Le Sueur's story lost all credit with me, for I instantly saw that it was nothing but a continuation of the seam which divided the sandstone from the limestone ... containing a silicate of iron of a blueish-green color." In the first place, F'gh was not at exactly the right spot, which Nicollet has pointed out. Secondly, though Lesueur should have been mistaken or mendacious about any copper-mine being in that region—though he should not have collected 30,000 lbs. of ore in 22 days, or even a gunny-sack full of anything in a year—though the mountains should shrink to bluffs, and the whole commercial features of the case turn into the physiognomy of the wild-cat—that would not affect the historical and geographical facts, viz.: Lesueur ascended the St. Peter's to the Mankato, and this as
  • 73.
    far at leastas its first branch, thus exploring both these rivers in 1700. Item, he had been to if not also up the river of St. Pierre in 1695; and it had been known since his first voyage in 1683. (6) As to the name Rivière St. Pierre, or de St. Pierre, which we have translated St. Peter, or St. Peter's r., the former obscurity of its origin has, I think, been almost entirely cleared up. Keating's Long, 1824, I. p. 322, has: "We have sought in vain for the origin of the name; we can find no notice of it; it appears to us at present not unlikely that the name may have been given by le Sueur in 1795 [slip for 1695], in honor of M. de St. Pierre Repantigni, to whom La Hontan incidentally alludes (I. p. 136) as being in Canada in 1789 [i. e., 1689]. This person may have accompanied le Sueur on his expedition." Keating does not cite in this connection the remark of Carver, ed. 1796, p. 35: "Here [at Lake Pepin] I discovered the ruins of a French factory, where it is said Captain St. Pierre resided, and carried on a very great trade with the Naudowessies [Sioux], before the reduction of Canada." This person was Jacques Le Gardeur St. Pierre, who in 1737 commanded the fort on Lake Pepin (Fort Beauharnois). One Fort St. Pierre was built at Rainy l. late in 1731; J. Le G. St. Pierre was there in 1751: for extended notice of him, see Neill, Macalester Coll. Cont., No. 4, 1890, pp. 136-40. His father was Captain Paul St. Pierre, who was sent to the French post (Maison Françoise) at La Pointe (Chaquamegon bay) in 1718. Nicollet, Rep. 1843, p. 68, cites Carver, and states: "I have no hesitation in assigning its [the name's] origin to a Canadian by the name of De St. Pierre, who resided for a long time thereabouts." The name appears for the first time in Perrot's report, of the date 1689, which is also the most probable date of naming the St. Croix r. and Lake Pepin. The only
  • 74.
    question left is,whether the river was not named to compliment Pierre Lesueur himself. Whoever the St. Pierre whose name the river bears may prove to be, the name is a personal one, which we should not have translated into English St. Peter; for it certainly has nothing to do with the legendary saint so styled, whose career is connected with the crowing of cocks three times more than with the course of any river. Had the stream been named by some priest for such a sadly overworked patron as the apocryphal first Bishop of Rome, we should have heard all about it in the Jesuit Relations or elsewhere. (7) The suggestion that the name St. Pierre is a perversion of sans pierres ("without stones"), may be dismissed as too good to be true; for it is a settled principle of sound philology that the easiest etymologies are the most likely to have been invented to fit the case, ex post-facto. (8) As to native names, Nicollet says, l. c.: "The name which the Sioux give to the St. Peter's river is Mini- sotah; and to St. Peter's, as a station [Mendota], Mdote-mini-sotah. The adjective sotah is of different translation. The Canadians translate it by a pretty equivalent French word, brouillé—perhaps most properly rendered into English by blear; as, for instance, mini sotah, blear water, or the entrance of blear water. I have entered into this explanation, because the word sotah really means neither clear nor turbid, as some authors have asserted; its true meaning being readily found in the Sioux expression ishta-sotah, blear-eyed.... The Chippeways are more accurate; by them, the St. Peter's river [is called] Ashkibogi-sibi, the Green Leaf river." It occurs to me that the distinction Nicollet draws would correspond to translucent, as distinguished on the one hand from colorless or transparent water, and on the other from opaque or turbid water. I may also refer to the old
  • 75.
    medical term, guttaserena, for forming cataract of the eye, when clear vision is obscured by a degree of opacity that does not entirely exclude light. As applied to water, Sioux sotah may be about equivalent to Greek γλαυκός, Latin glaucus, variously rendered "gray," "bluish-green," etc., and Nicollet's "blear-eyed" be equivalent to what was called glaucoma (γλαύκωμα). Notice what Pike says above of the color of the water; but it must be added that, when he speaks of the Mississippi as "remarkably red," we must understand only a reddish-yellow hue of its shoal portions, imparted by its sands; and by "black as ink," only the darker color of deeper places where the sands do not show through. The name Mini-sota has a number of variants: for example, Carver, who wintered on it Nov., 1766-Apr., 1767, has "the River St. Pierre, called by the natives the Waddapawmenesotor"; with which compare Watapan Menesota of Long, Watpàmenisothé of Beltrami, and the title of Featherstonhaugh's diverting book, "A Canoe Voyage up the Minnay Sotor," etc. It has become fixed of late years, since an Act of Congress, approved June 19th, 1852 (Stat. at Large, X. p. 147), decreed that the noble river should bear the name of the State through which it flows. (9) The Minnesota r. appears on various old maps of Louisiana (not on Hennepin's, 1683). Franquelin's, 1688, traces it without any name, but letters it with the name of the Indians, "Les Mascoutens Nadouescioux," i. e., Sioux of the Prairie, Gens du Large of the French, collectively, as distinguished from Gens du Lac. De L'Isle's map, 1703, has "R. St. Pierre." [II-1] The village which Pike visited is marked on his map on the west, upper, or left bank of the Minnesota r., which here runs little E. of N. into the Mississippi.
  • 76.
    The hill onthe point whence the Sioux saluted him so savagely was the scene of many a more warlike demonstration in after-years; for here was built Fort St. Anthony, later known as Fort Snelling, one of the most important and permanent military establishments in the United States, and for nearly half a century the most notable place on the Mississippi above Prairie du Chien. It was erected on the land which Pike secured by the transaction his text is about to describe, and which extended thence up the river to include the falls of St. Anthony, and thus the site of the present great city of Minneapolis, with St. Paul the twin metropolis of the Northwest. The location of Fort Snelling is in Nicollet's opinion "the finest site on the Mississippi river"; and I should be the last to dissent from this judgment, after my enjoyable visit to the fort in 1873, at the invitation of General Alexander. The bluff headland is about 105 feet above the water; the two rivers separated by this rocky point are respectively over 300 and nearly 600 feet broad. The height of Pilot Knob, across the Minnesota r., is about 250 feet. The plateau on the point of which the fort is situated stretches indefinitely S. W.; 8 m. direct N. W. are Minneapolis and the falls. The Mississippi receives the Minnesota at the point of greatest convexity of a deep bend to the S., duplicating that bend to the N. on which St. Paul is situated, the two together forming quite a figure of s. Nothing came of Pike's recommendation of this site for a military post till a report to the same effect was made by Major Long, after his expedition of 1817, during which he reached the place at 2 p. m., Wednesday, July 16th. On Feb. 10th, 1819, the Secretary of War, John C. Calhoun, ordered the 5th infantry to proceed to the Mississippi and establish regimental headquarters at the mouth of St. Peter's r. A detachment of troops, mustering 98
  • 77.
    rank and file,under Colonel Henry Leavenworth, who had become lieutenant-colonel of that regiment Feb. 10th, 1818, was first cantoned at New Hope, near Mendota, Sept. 24th, 1819, and preparations were begun at once for a permanent structure. The winter of 1819-20 was disastrous from scurvy. On May 5th, 1820, camp was shifted to a place near a spring, above the graveyard, and was thereupon named Camp Coldwater. In the spring of 1820 Jean Baptiste Faribault located himself in the vicinity; Governor Lewis Cass came from his exploration of the upper Mississippi during the summer, and Lawrence Taliaferro's Indian agency was established as Camp St. Peter's. As usual, the colonel commanding and the Indian agent clashed, notably in the matters of medals and whisky. In August, 1820, Colonel Josiah Snelling, who had become colonel of the regiment June 1st, 1819, arrived and relieved Colonel Leavenworth of the command. He determined to build on the point originally selected by Pike. The corner-stone of Fort St. Anthony is supposed to have been laid Sept. 10th, 1820; and the building was so far forward in the autumn of 1822 that the troops moved in, though it was not completed. It is traditional that a tree on which Pike had cut his name was ordered to be spared in the process of construction; but, if so, it soon disappeared. On May 10th, 1823, the first steamboat, the Virginia, reached the fort. It brought among other notables the Chevalier Beltrami. On July 3d, 1823, Major Long arrived, en route to his exploration of St. Peter's r. In 1824 General Winfield Scott visited the fort on a tour of inspection. It does not appear to have struck anybody before that the name of a professional saint of the Prince of Peace was absurdly inapplicable to any military establishment. General Scott very sensibly reported that the name was "foreign to all our
  • 78.
    associations," besides being"geographically incorrect," and recommended the post to be named Fort Snelling, in well-deserved compliment to the distinguished officer who had built it. The story of Fort Snelling, from its inception to the end of all Indian collisions, is an integral and very prominent part of the history of Minnesota; it is an honorable record, of which citizens and soldiery may be equally proud—one replete with stirring scenes and thrilling episodes, which in the lapse of years tradition has delighted to set in all the glamour of romance. But the most sober historians have found a wealth of material in the stern actualities of Fort Snelling. The facts in the case need no embellishment. The following are some of the many references that could be given to the early history of Fort Snelling: Occurrences in and around Fort Snelling from 1819 to 1840, E. D. Neill, M. H. C., II. Part 2, 1864; 2d ed. 1881, pp. 102-42. Early Days at Fort Snelling, Anon., M. H. C., I. Part 5, 1856; 2d ed. 1872, pp. 420-438 (many inaccuracies in dates, etc.). Running the Gauntlet, ibid., pp. 439-56, Anon., believed to be by W. J. Snelling, son of Josiah Snelling. Reminiscences of Mrs. Ann Adams, 1821-29, M. H. C., VI. Part 2, 1891, pp. 93-112. Autobiography of Maj. Lawrence Taliaferro, written in 1864, M. H. C., VI. Part 2, pp. 189-255 (specially interesting, as he was Indian agent, 1819-40). [II-2] Pike's speech at this memorable conference, the treaty itself, and a long letter which Pike addressed to Wilkinson in this connection on the 23d, 24th, and 25th, formed Docs. Nos. 4 and 5 of the App. to Part 1 of the orig. ed. These are given in full beyond, Chap. V. Arts. 4, 5, and 6, where the text of the treaty is subjected to a searching criticism in the light of subsequent events. Here we may conveniently note
  • 79.
    the names ofthe chiefs concerned in the transaction. The best article I have seen upon this subject is that by Dr. Thomas Foster of Duluth, in the St. Paul Daily Democrat of May 4th, 1854, as cited by J. Fletcher Williams in Minn. Hist. Coll., I. 2d ed. 1872, p. 379; this, however, requires some additions and corrections. 1. Little Crow and Little Raven are English equivalents of Petit Corbeau, which latter is a French version of the name of the hereditary chiefs of the Kapoja band, borne by successive individuals through several generations. Pike's Little Crow is said by Long to have been son of Little Crow, who was himself son of Little Crow; and Foster identifies Pike's Little Crow "as the grandfather of the present chief, Little Crow," i. e., of one of this name who was chief in 1854, adding neatly that "he was the Great Crow of all," i. e., the most celebrated of all those who bore the name. This reference would seem to cover five generations, from Pike's Little Crow backward to his grandfather and forward to his grandson. Riggs renders Pike's Little Crow's name Chatanwakoowamani, Who-walks- pursuing-a-hawk; says that his son's name was Wamdetanka, or Big Eagle, who flourished in the thirties; and adds that the dynasty became extinct with Taoyatidoota (or Towaiotadootah), who was the Little Crow of the Sioux outbreak of 1862. He was a very black crow indeed, this last of the Corvidæ, and was killed by a Mr. Lamson in 1863. Confining attention now to the one who seems by this reckoning to have been Little Crow III. of the series I.-V., we find him tabulated by Pike as Chatewaconamini. We have already found him cited by Long as Chetanwakoamene, rendered Good Sparrow Hunter. Beltrami, II. p. 191, presents Chatewaconamani, or the Little Raven, as the chief in 1823. Featherstonhaugh
  • 80.
    has a chiefhe calls Tchaypehamonee, or Little Crow, living in 1835. Rev. Dr. Neill has in one place Chatonwahtooamany, Petit Corbeau. Dr. Foster gives the Dakota name as Tchahtanwahkoowahmane, or the Hawk that Chases Walking. Pike's Little Crow lived many years after he "touched the quill" (signed his x mark) to the cession, and was in Washington in 1824. Schoolcraft, who held a council with the Wahpeton Sioux at Fort Snelling, July 25th, 1832, says, Narr., etc., 1834, p. 146: "The aged chief Petite [sic] Corbeau uttered their reply. I recognized in this chief one of the signers of the grant of land made at this place 26 years ago, when the site of the fort was first visited by the late General Pike." The death of this good man (in 1834?) occurred from a mortal wound he accidentally inflicted upon himself in drawing his gun from a wagon, at his village of Kaposia. The circumstances are narrated with interesting particulars by General H. H. Sibley, Minn. Hist. Coll., III. 1874, pp. 251-54. 2. The chief here and consistently throughout Pike's book of 1810 called Fils de Pinchow appears in the 1807 text as Fils de Penichon, Penechon, or Pinechon; but nowhere are we told of whom this eminent individual was the son. The name seems to have been one to conjure with; and our curiosity is excited to discover Pinchow I., who was such a personage that Pike's Fils de Pinchow, or Pinchow II., needed no other title to glory. On looking up this subject, I find, first, that "Pinchow," as rendered in the above text, and the three forms given in the 1807 print, are four variants of a word which is also written Pinichon, Pinchon, Penition, Pinneshaw, etc., in French or English; and that these are corruptions of a Dakota word. Thus Beltrami, II. p. 207, introduces us to one Tacokoquipesceni, or Panisciowa, as being in 1823
  • 81.
    Welcome to ourwebsite – the perfect destination for book lovers and knowledge seekers. We believe that every book holds a new world, offering opportunities for learning, discovery, and personal growth. That’s why we are dedicated to bringing you a diverse collection of books, ranging from classic literature and specialized publications to self-development guides and children's books. More than just a book-buying platform, we strive to be a bridge connecting you with timeless cultural and intellectual values. With an elegant, user-friendly interface and a smart search system, you can quickly find the books that best suit your interests. Additionally, our special promotions and home delivery services help you save time and fully enjoy the joy of reading. Join us on a journey of knowledge exploration, passion nurturing, and personal growth every day! ebookbell.com