ملخص المحتوى في الصفحة رقم 1
ملخص المحتوى في الصفحة رقم 2
® Microsoft ® Visual Studio 2010 A Beginner’s Guide
ملخص المحتوى في الصفحة رقم 3
About the Author Joe Mayo started his software development career in 1986, working on an RCA Spectrum 70 mainframe computer, programming in assembly language where input was via Hollerith card, output was a line printer, and the debugging experience was a light panel where you had to push buttons to load registers and step through commands. Since then, Joe has worked with various mini-computers, workstations, and PCs. The operating systems he’s worked on include proprietary, UNIX-based, MS-
ملخص المحتوى في الصفحة رقم 4
® Microsoft ® Visual Studio 2010 A Beginner’s Guide Joe Mayo New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto
ملخص المحتوى في الصفحة رقم 5
Copyright © 2010 by The McGraw-Hill Companies. All rights reserved. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher. ISBN: 978-0-07-166896-5 MHID: 0-07-166896-9 The material in this eBook also appears in the print version of this title: ISBN: 978-0-07-166895-8, MHID: 0-07-166895-0. All tra
ملخص المحتوى في الصفحة رقم 6
To my son, Kamo.
ملخص المحتوى في الصفحة رقم 7
This page intentionally left blank
ملخص المحتوى في الصفحة رقم 8
Contents at a Glance PART I Understanding Visual Studio 2010 Essentials 1 Introducing Visual Studio 2010 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Learning Just Enough C# or VB.NET: Basic Syntax . . . . . . . . . . . . . . . . . . . . . 35 3 Learning Just Enough C# and VB.NET: Types and Members . . . . . . . . . . . . 67 4 Learning Just Enough C# and VB.NET: Intermediate Syntax . . . . . . . . . . . 89 PART II Learning the VS 2010 Environme
ملخص المحتوى في الصفحة رقم 9
viii Microsoft Visual Studio 2010: A Beginner’s Guide 10 Designing Silverlight Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 11 Deploying Web Services with WCF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 PART IV Enhancing the VS 2010 Experience 12 Customizing the Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 13 Extending Visual Studio 2010 . . . . . . . . .
ملخص المحتوى في الصفحة رقم 10
Contents ACKNOWLEDGMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix PART I Understanding Visual Studio 2010 Essentials 1 Introducing Visual Studio 2010 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 What Is Visual Studio 2010
ملخص المحتوى في الصفحة رقم 11
x Microsoft Visual Studio 2010: A Beginner’s Guide Floating Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Tabbed Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Closing and Opening Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Modifying Environment Settings after Set
ملخص المحتوى في الصفحة رقم 12
Contents xi Returning Data and Using Method Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Method Snippets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Coding Fields and Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Declaring and Using Fields . . . . . . . . . . . . . . . . . . . . . . . . . . .
ملخص المحتوى في الصفحة رقم 13
xii Microsoft Visual Studio 2010: A Beginner’s Guide Compiling Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 Building Solutions/Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 Rebuilding Solutions/Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Cleaning Solutions/Projects
ملخص المحتوى في الصفحة رقم 14
Contents xiii Learning Language Integrated Query (LINQ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Querying Object Collections with LINQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Creating a LINQ Projection with Anonymous Types . . . . . . . . . . . . . . . . . . . . . . . . . . 198 Using LINQ to Sort Collection Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 Handling Data
ملخص المحتوى في الصفحة رقم 15
xiv Microsoft Visual Studio 2010: A Beginner’s Guide Assigning MasterPage Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 Partial Views (a.k.a. User Controls) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 Managing Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 Building a Customer Management
ملخص المحتوى في الصفحة رقم 16
Contents xv Writing Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 Recording a Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 Saving a Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 Editing Macros . . . . . . . . . . . . .
ملخص المحتوى في الصفحة رقم 17
This page intentionally left blank
ملخص المحتوى في الصفحة رقم 18
Acknowledgments work of this magnitude is never the ramblings of a single author, but a successful A combination of dedication from a team of highly skilled professionals. I would like to personally thank several people who helped make this book possible. Jane Brownlow, Executive Editor, helped kick off the book and got it started on the right path. Megg Morin, Acquisitions Editor, took the reins from Jane and led the rest of the way. Joya Anthony, Acquisitions Coordinator, helped keep the
ملخص المحتوى في الصفحة رقم 19
This page intentionally left blank
ملخص المحتوى في الصفحة رقم 20
Introduction isual Studio has been the primary integrated development environment (IDE) for VMicrosoft software development for several years. Visual Studio 2010 (VS), the subject of this book, is therefore a mature evolution, building upon the success of its predecessors. This book will show you how to leverage Visual Studio 2010 to your advantage, increasing your skill set, and helping you become more productive in building software. The software you will learn to write will be for .NET (