MCSD Certification Toolkit (Exam 70-483): Programming in C#
Published by
John Wiley & Sons, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright © 2013 by John Wiley & Sons, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 9781118612095
ISBN: 978-1-118-61206-4 (ebk)
ISBN: 978-1-118-72950-2 (ebk)
ISBN: 978-1-118-72929-8 (ebk)
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.
Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read.
For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com.
Library of Congress Control Number: 2013933931
Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc., is not associated with any product or vendor mentioned in this book.
To Lia for her patience and understanding during the writing process. All my love.
—Gerry O’Brien
For Maki.
—Rod Stephens
To Renee, Madison, and Courtney.
—Vince Varallo
Tiberiu Covaci is an Independent trainer and mentor teaching C# and .NET in general, and ASP.NET and parallel computing in particular. He works closely with Microsoft Learning helping them develop new courses, conducting beta classes and doing technology reviews for the upcoming courses. He was part of the Microsoft Certified Trainer Advisory Council between 2010 and 2012.
Tiberiu is a popular speaker at industry conferences and user groups around the world. His sessions and workshops get good reviews from both the attendees and the organizers.
Tiberiu is a Microsoft Certified Trainer and holds almost all .NET certification from .NET 2.0 and forward. He is as well an IASA certified trainer, an ASP.NET Insider, and a Telerik Insider. He is an INETA Speaker Bureau member and IASA Speaker. For his dedication and passion, Microsoft and Telerik presented Tibi with the MVP Award.
Tiberiu is the husband of lovely Nicoleta and the proud father of Anna and Disa.
Gerry O’Brien currently works at Microsoft as a program manager in Microsoft Learning where he manages internal tools and platforms working with teams of developers and testers. Prior to the program manager role, Gerry worked as the Certification Product Planner for the developer and SQL Server audiences at Microsoft Learning. In that role, he planned the exam portfolio for these audiences, working with industry experts to define the exam content and manage the exam from envisioning through development, beta, and release. Prior to working at Microsoft, Gerry worked as a software development consultant and trainer.
Rod Stephens started out as a mathematician, but, while studying at MIT, discovered how much fun programming is and has been programming professionally ever since. During his career, he has worked on an eclectic assortment of applications in such fields as telephone switching, billing, repair dispatching, tax processing, wastewater treatment, concert ticket sales, cartography, and training for professional football players.
Rod is a Microsoft Visual Basic Most Valuable Professional (MVP) and has taught introductory programming at ITT Technical Institute. He has written more than two dozen books that have been translated into languages from all over the world, and more than 250 magazine articles covering Visual Basic, C#, Visual Basic for Applications, Delphi, and Java.
Rod’s popular VB Helper website (www.vb-helper.com) receives several million hits per month and contains thousands of pages of tips, tricks, and example programs for Visual Basic programmers, as well as example code for this book. His C# Helper website (www.csharphelper.com) contains similar material for C# programmers.
You can contact Rod at [email protected] or [email protected].
Vince Varallo has been developing applications using Microsoft technologies for the past 17 years. He began his career as a Visual Basic 3 developer and has worked with VB 4, 5, and 6 until the .NET Framework 1.0 was released. He was an early adopter of ASP.NET and C#, and has concentrated on line-of-business applications throughout his entire career. He is currently the director of Technology Solutions at a digital marketing agency where he works with a wide variety of technologies. He previously authored ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008 and contributed as an author for Professional Visual Basic 6: The 2003 Programmer’s Resource.
Anders Bratland combines his two passions, programming and teaching other people how to program, by working as a freelance consultant, which gives him the chance to work both as a Microsoft Certified Trainer and as a developer.
Anders is a well-known speaker at conferences like TechDays, Scandinavian Developer Conference, and Developer Summit. Anders is also active as speaker in different user groups, such as DotnetForum, and also as one of the organizers in the largest Swedish user group, Swenug.
Anders has a strong commitment to techniques and methods that can help projects to be successful, especially by adopting agile values and disciplines.
Anders is a Microsoft ASP.NET MVP and a member of the Swedish Microsoft Extended Expert Team, MEET.
Executive Editor: Robert Elliott
Project Editor: Jennifer Lynn
Technical Editor: Anders Bratland
Production Editor: Daniel Scribner
Copy Editor: San Dee Phillips
Editorial Manager: Mary Beth Wakefield
Freelancer Editorial Manager: Rosemarie Graham
Associate Director of Marketing: David Mayhew
Marketing Manager: Ashley Zurcher
Business Manager: Amy Knies
Production Manager: Tim Tate
Vice President and Executive Group Publishe: rRichard Swadley
Vice President and Executive Publisher: Neil Edde
Associate Publisher: Jim Minatel
Project Coordinator, Cover: Katie Crocker
Compositor: Jeff Lytle, Happenstance Type-O-Rama
Proofreader: James Saturnio, Word One
Indexer: Ron Strauss
Cover Designer: Wiley
Cover Image: iStockphoto/microstocker
I would like to thank my lovely wife Nicoleta and my daughters, Anna and Disa, for supporting me and putting up with me for the past three years. I know this was a long process, and I know you might have not liked it at times, but now that is done I hope that people will find it educational and then all of it was worth it.
I want to thank Bob Elliott for believing in me even when I didn’t. I want to thank Jennifer Lynn and Rosemarie Graham for their help in making this book happen. I would like to thank Anders Bratland for lending his expertise and making sure that this book is technologically accurate. I would like to thank my co-authors Gerry O’Brien, Rod Stephens, and Vince Varallo for their hard work and devotion.
I would also like to thank Sergiu Damian for his help reviewing my chapters, Catalin Pop for helping me with his expertise on encryption, and Susan Ibach and Christopher Harrison for recommending me as author.
Last but not least I would like to thank my parents for making me who I am.
—Tiberiu Covaci
3.21.12.140