ebook_0538479515_Object_Oriented_Programming_Visual_CSharp.pdf

(15146 KB) Pobierz
This is an electronic version of the print textbook. Due to electronic rights restrictions,
some third party content may be suppressed. Editorial review has deemed that any suppressed
content does not materially affect the overall learning experience. The publisher reserves the right
to remove content from this title at any time if subsequent rights restrictions require it. For
valuable information on pricing, previous editions, changes to current editions, and alternate
formats, please visit
www.cengage.com/highered
to search by ISBN#, author, title, or keyword for
materials in your areas of interest.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
FOURTH EDITION
MICROSOFT®
VISUAL C#® 2010
AN INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
J O Y C E FA R R E L L
Australia • Brazil • Japan • Korea • Mexico • Singapore • Spain • United Kingdom • United States
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Microsoft® Visual C#® 2010: An
Introduction to Object-Oriented
Programming, Fourth Edition
Joyce Farrell
Publisher: Nicole Pinard
Executive Editor: Marie Lee
Acquisitions Editor: Amy Jollymore
Senior Product Manager: Alyssa Pratt
Development Editor: Dan Seiter
Content Project Manager: Lisa Weidenfeld
Manufacturing Buyer: Julio Esperas
Proofreader: Brandy Lilly
Copyeditor: Michael Beckett
Indexer: Sharon Hilgenberg
Art Director: Faith Brosnan
Text Designer: Shawn Girsberger
Cover Photo: iStockphoto.com/Dimitrije
Cover Designer: Bruce Bond
Editorial Assistant: Jacqueline Lacaire
Art Director: Marissa Falco
Marketing Manager: Adam Marsh
Quality Assurance: Chris Scriver and
Danielle Shaw
Compositor: Integra
© 2011 Course Technology, Cengage Learning
ALL RIGHTS RESERVED. No part of this work covered by the copyright
herein may be reproduced, transmitted, stored, or used in any form or by
any means—graphic, electronic, or mechanical, including but not limited
to photocopying, recording, scanning, digitizing, taping, Web distribution,
information networks, or information storage and retrieval systems, except
as permitted under Section 107 or 108 of the 1976 United States Copyright
Act—without the prior written permission of the publisher.
For product information and technology assistance, contact us at
Cengage Learning Customer & Sales Support, 1-800-354-9706
For permission to use material from this text or product,
submit all requests online at
www.cengage.com/permissions
Further permissions questions can be e-mailed to
permissionrequest@cengage.com
Library of Congress Control Number: 2010930061
ISBN-13: 978-0-538-47951-6
ISBN-10: 0-538-47951-5
Course Technology
20 Channel Center Street
Boston, MA 02210
USA
Cengage Learning is a leading provider of customized learning solutions
with office locations around the globe, including Singapore, the United
Kingdom, Australia, Mexico, Brazil, and Japan. Locate your local office at:
www.cengage.com/global
Cengage Learning products are represented in Canada by
Nelson Education, Ltd.
To learn more about Course Technology, visit
www.cengage.com/
coursetechnology
To learn more about Cengage Learning, visit
www.cengage.com
Purchase any of our products at your local college store or at our preferred
online store
www.cengagebrain.com
Some of the product names and company names used in this book have
been used for identification purposes only and may be trademarks or
registered trademarks of their respective manufacturers and sellers.
Any fictional data related to people, companies, or URLs used throughout
this book is intended for instructional purposes only. At the time this book
was printed, any such data was fictional and not belonging to any real
people or companies.
Course Technology, a part of Cengage Learning, reserves the right to revise this
publication and make changes from time to time in its content without notice.
The programs in this book are for instructional purposes only. They have
been tested with care, but are not guaranteed for any particular intent
beyond educational purposes. The author and the publisher do not offer
any warranties or representations, nor do they accept any liabilities with
respect to the programs.
Printed in the United States of America
1 2 3 4 5 6 7 14 13 12 11 10
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Brief Contents
iii
P refa ce
CHA PTER 1
CHAP TER 2
CHAP TER 3
. . . . . . . . . . . . . . . . .
xv
. . . . . . . . .
1
A Fi rs t Pro g ra m Usi ng C#
Us in g D a t a . . . . . . . . . . . . . . . .
49
Us in g G U I O b j e ct s a nd t he V i sua l
St u di o ID E . . . . . . . . . . . . . . .
103
M ak in g D e ci si o n s . . . . . . . . . . . .
142
Loo pi n g . . . . . . . . . . . . . . . .
194
Us in g A r r ay s . . . . . . . . . . . . . .
232
Us in g M et ho ds . . . . . . . . . . . . .
273
Ad va n ce d M e th o d Co nce p t s . . . . . . . .
315
Us in g C la sse s a nd O b j ec ts . . . . . . . .
354
I n t ro d u ct ion t o I nhe r i ta nc e . . . . . . . .
427
E x cep t io n H an dl i ng
. . . . . . . . . . .
490
CHAP TER 4
CHAP TER 5
CHAP TER 6
CHAP TER 7
CHAP TER 8
CHAP TER 9
CHAP TER 10
CHAP TER 11
CHAP TER 12
CHAP TER 13
CHAP TER 14
CHAP TER 15
U s in g Co nt ro l s . . . . . . . . . . . . .
540
Han dl in g E v ent s . . . . . . . . . . . . .
606
F il es a n d S tre a ms . . . . . . . . . . . .
656
U s in g L IN Q t o A c ce ss D at a i n C#
P rog r a m s . . . . . . . . . . . . . . . .
708
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Zgłoś jeśli naruszono regulamin