2006 wiley beginning visual c sharp 2005

1.7K 164 0
2006   wiley    beginning visual c sharp 2005

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Beginning Visual C# 2005 byKarli Watsonet al Wrox Press 2006 (1102 pages) ISBN:0764578472 With helpful hints, tips, exercises, and example code, this book covers everything you need to know about Visual C# 2005 and the NET Framework to create secure applications for mobile devices, Web applications, Windows applications, and Web services Table of Contents Beginning Visual C# 2005 Introduction Part I - The C# Language Chapter 1 - Introducing C# Chapter 2 - Writing a C# Program Chapter 3 - Variables and Expressions Chapter 4 - Flow Control Chapter 5 - More about Variables Chapter 6 - Functions Chapter 7 - Debugging and Error Handling Chapter 8 - Introduction to Object-Oriented Programming Chapter 9 - Defining Classes Chapter 10 - Defining Class Members Chapter 11 - Collections, Comparisons, and Conversions Chapter 12 - Generics Chapter 13 - Additional OOP Techniques Part II - Windows Programming Chapter 14 - Basic Windows Programming Chapter 15 - Advanced Windows Forms Features Chapter 16 - Using Common Dialogs Chapter 17 - Deploying Windows Applications Part III - Web Programming Chapter 18 - Basic Web Programming Chapter 19 - Advanced Web Programming Chapter 20 - Web Services Chapter 21 - Deploying Web Applications Part IV - Data Access Chapter 22 - File System Data Chapter 23 - XML Chapter 24 - Databases and ADO.NET Chapter 25 - Data Binding Part V - Additional Techniques Chapter 26 - NET Assemblies Chapter 27 - Attributes Chapter 28 - XML Documentation Chapter 29 - Networking Chapter 30 - Introduction to GDI+ Index List of Figures List of Try It Outs Back Cover Creating next-generation software and applications is now easier than ever with the release of Visual C# 2005 This accessible book guides you through all aspects of C# programming and the capabilities of Visual Studio 2005 so that you can begin developing customized applications You'll first learn all aspects of the C# language, from the fundamentals to object-oriented techniques You'll then quickly progress through Windows and Web programming to making use of data sources, and finally to some advanced techniques such as XML documentation and graphics programming with GDI+ Throughout the book, you'll also find helpful hints, tips, exercises, and full-fledged example code that will enhance your programming skills This book covers everything you need to know about Visual C# 2005 and the NET Framework to create powerful, secure applications for mobile devices, Web applications, Windows applications, and Web services What you will learn from this book Ways to add functionality to your Visual C# applications How to publish applications to the Web with the click of a button Techniques for assembling advanced Windows applications with a minimum of effort and time Tips for using Web services to add complex data and functionality to Web applications How to improve your C# applications using object-oriented programming Steps for using ADO.NET to interact with databases and deal with XML Who this book is for This book is for anyone who wants to learn how to program in C# using the NET Framework It is also for programmers who know NET 1.0 and want to find out about the latest features of NET 2.0 and Visual Studio 2005 Beginning Visual C# 2005 Karli Watson Christian Nagel Jacob Hammer Pedersen Jon D Reid Morgan Skinner Eric White Published by Wiley Publishing, Inc 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright 2006 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN-13: 978-0-7645-7847-2 ISBN-10: 0-7645-7847-2 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 1O/RR/RQ/QV/IN Library of Congress Cataloging-in-Publication Data: Beginning Visual C# 2005 / Karli Watson [et al.] p cm Updated ed of: Beginning Visual C# 2003 Includes index ISBN-13: 978-0-7645-7847-2 (paper/website) ISBN-10: 0-7645-7847-2 (paper/website) C# (Computer program language) 2 Microsoft NET Framework I Watson, Karli II Beginning Visual C# QA76.73.C154B483 2005 005.13'3 dc22 2005010692 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 percopy 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 Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, 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 WEBSITE 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 WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES 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 (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002 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 Visual C# is a registered trademark of Microsoft Corporation in the United States and/or other countries All other trademarks are the property of their respective owners Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book Wiley also publishes its books in a variety of electronic formats Some content that appears in print may not be available in electronic books Credits Acquisitions Editor Katie Mohr Development Editor Tom Dinse Technical Editor Todd Meister Production Editor Angela Smith Copy Editor Foxxe Editorial Services Editorial Manager Mary Beth Wakefield Vice President & Executive Group Publisher Richard Swadley Vice President and Publisher Joseph B Wikert Project Coordinators Ryan Steffen Erin Smith Graphics and Production Specialists Andrea Dahl Denny Hager Jennifer Heleine Stephanie Jumper Barbara Moore Shelley Norris Lynsey Osborn Heather Ryan Alicia South Ron Terry Julie Trippetti Quality Control Technicians Laura Albert Leeann Harney Carl William Pierce Proofreading and Indexing TECHBOOKS Production Services for donna —Karli Watson I'd like to dedicate my portion of this book to my wife, Beth, and our children Nathaniel, Timothy, and Walter Thanks for your support and encouragement Also a big thank you to my co-authors and the team at Wrox/Wiley —Jon Reid About the Authors Karli Watson is the technical director of 3form (www.3form.net), as well as a freelance IT specialist, author, developer, and consultant For the most part, he immerses himself in NET (in particular C#) and has written numerous books in the field for several publishers He specializes in communicating complex ideas in a way that is accessible to anyone with a passion to learn, and spends much of his time playing with new technology to find new things to teach people about During those (seemingly few) times where he isn't doing the above, Karli will probably be wishing he was hurtling down a mountain on a snowboard Or possibly trying to get his novel published Either way, you'll know him by his brightly colored clothes Christian Nagel is a software architect, trainer, and consultant, and an associate of Thinktecture, offering training and coaching based on Microsoft NET technologies His achievements in the developer community have earned him a position as Microsoft Regional Director and MVP for Visual C# He enjoys an excellent reputation as an author of several NET books, such as Professional C#, Pro NET Network Programming and C# Web Services, and he speaks regularly at international industry conferences Christian looks back on more than 15 years of experience as a developer and software architect He started his computing career on PDP 11 and VAX/VMS, covering a variety of languages and platforms Since 2000 he has been working with NET and C#, developing and architecting distributed solutions http://www.christiannagel.com http://www.thinktecture.com Jacob Hammer Pedersen is a systems developer at Fujitsu Service, Denmark He's been programming the PC since the early 90s using languages such as Pascal, Visual Basic, C/C++, and in later years C# Jacob is an MCSD who works almost exclusively on the Microsoft platform where his expertise includes NET, COM, COM+/Enterprise Services, SQL Server, and MS Office development A Danish citizen, he works and lives in Aarhus, Denmark Jon D Reid is the President and Chief Technology Officer for Savitar Corporation, an independent software vendor and consulting company that develops database tools for the Microsoft.NET environment He has co-authored many NET books, including Pro Visual Studio NET, Fast Track to C# Programming, ADO.NET Programmer's Reference, and Professional SQL Server 2000 XML Jon would like to thank his family, co-authors, and the team at Wrox for their support and encouragement Morgan Skinner began his computing career at a tender age on a Sinclair ZX80 at school, where he was underwhelmed by some code a teacher had written and so began programming in assembly language After getting hooked on Z80 (which he believes is far better than those paltry 3 registers on the 6502), he graduated through the school's ZX81s to his own ZX Spectrum Since then he's used all sorts of languages and platforms, including VAX Macro Assembler, Pascal, Modula2, Smalltalk, X86 assembly language, PowerBuilder, C/C++, VB, and currently C# He's been programming in NET since the PDC release in 2000, and liked it so much, he joined Microsoft in 2001 He now works in Premier Support for Developers and spends most of his time assisting customers with C# You can reach Morgan at http://www.morganskinner.com Eric White is an independent software consultant with over 20 years experience in building management information systems and Chapter 16: Using Common Dialogs Try It Out – Creating the Simple Text Editor Windows Application Try It Out – Adding and Using an OpenFileDialog Try It Out – Adding and Using a SaveFileDialog Try It Out – Setting the Title of the Form Try It Out – Adding a PrintDocument Component Try It Out – Modifying OnPrintPage() for Multiple Pages Try It Out – Adding a PageSetupDialog Try It Out – Adding a PrintDialog Try It Out – Adding a Print Selection Try It Out – Adding a PrintPreviewDialog Chapter 17: Deploying Windows Applications Try It Out – Sign the ClickOnce Manifests Try It Out – Define the Permission Requirements Try It Out – Using the Publish Wizard Try It Out – Installation of the Application Try It Out – Updating the Application Try It Out – Creating a Windows Installer Project Try It Out – Configuring the Project Try It Out – Add Files to the Installer Package Try It Out – Set the File Extension Try It Out – Start the User Interface Editor Try It Out – Configuring the Default Dialogs Try It Out – Adding Other Dialogs Try It Out – Build the Project Chapter 18: Basic Web Programming Try It Out – Create a Simple Web Page Try It Out – Display the User Input Try It Out – Display the Results in a Second Page Try It Out – Create a Strongly Typed PreviousPage Try It Out – Check for Required Input and Email Address Try It Out – Security Configuration Try It Out – Create a Login Page Try It Out – Using the CreateUser Wizard Try It Out – Create a New Database Try It Out – Using a GridView Control to Display Data Try It Out – Configure the GridView Control Chapter 19: Advanced Web Programming Try It Out – Create a Personal Website Try It Out – Create a Master Page Try It Out – Use a Master Page Try It Out – Add Navigation Try It Out – Create a User Control Try It Out – Using a User Control Try It Out – Create Profile Information Try It Out – Create a Web Application Using Web Parts Try It Out – Add an Editor Zone Try It Out – Add a Catalog Zone Try It Out – Create a Connection between Web Parts Chapter 20: Web Services Try It Out – Creating a Web Service Project Try It Out – Adding a Method Try It Out – Creating a Client Windows Application Try It Out – Creating an ASP.NET Client Application Try It Out – Creating Passing Data with a Web Service Chapter 21: Deploying Web Applications Try It Out – Create a New Website Try It Out – Copy a Web Site Try It Out – Precompiling a Website for Deployment Try It Out – Create a Setup Program Try It Out – Installing a Web Application Chapter 22: File System Data Try It Out – Reading Data from Random Access Files Try It Out – Writing Data to Random Access Files Try It Out – Output Stream Try It Out – Stream Input Try It Out – Comma-Separated Values Try It Out – Compressed Data Try It Out – Object Serialization Try It Out – Monitoring the File System Chapter 23: XML Try It Out – Creating an XML Document in Visual Studio Try It Out – Looping through All Nodes in an XML Document Try It Out – Creating Nodes Try It Out – Removing Nodes Try It Out – Selecting Nodes Chapter 24: Databases and ADO.NET Try It Out – Reading Data with the DataReader Try It Out – Reading from an Access Database Try It Out – Reading Data with the DataSet Try It Out – Updating the Database Try It Out – Adding Rows Try It Out – Finding Rows Try It Out – Deleting Rows Try It Out – Getting the Related Rows Try It Out – Working with Multiple Relations Try It Out – Writing XML from a DataSet Try It Out – Reading XML into a DataSet Try It Out – Show SQL Example Try It Out – Retrieving Single Values with ExecuteScalar() Try It Out – Data Modification with ExecuteNonQuery Try It Out – Calling a Stored Procedure Chapter 25: Data Binding Try It Out – Connecting to a Database Try It Out – Compile and Run the Database Application Chapter 26: NET Assemblies Try It Out – Creating the Shapes Component Try It Out – Viewing the Contents of an Assembly with Ildasm Try It Out – Creating a Shapes Client Try It Out – Signing the Shapes Assembly Chapter 27: Attributes Try It Out – Extracting the Public Key Chapter 28: XML Documentation Try It Out – Adding and Viewing Basic XML Documentation Try It Out – Adding XML Documentation in a Class Diagram Try It Out – Processing XML Documentation Chapter 29: Networking Try It Out – Using DNS Try It Out – Simulate a HTTP Request Try It Out – Using the WebClient Class Try It Out – Get a File from an FTP server Try It Out – Create a TCP server Try It Out – Create a TCP Client Chapter 30: Introduction to GDI+ Try It Out – Creating a Graphics Path Try It Out – Creating a Region Try It Out – Creating a Region Try It Out – Pen Example Try It Out – Brush Example Try It Out – Font Example Try It Out – Image Example Try It Out – Drawing an Ellipse with an Image Try It Out – Creating a Pen from an Image Try It Out – Drawing Text with an Image Try It Out – Double-Buffering Example ... Chapter 8: Introduction to Object-Oriented Programming Chapter 9: Defining Classes Chapter 10: Defining Class Members Chapter 11: Collections, Comparisons, and Conversions Chapter 12: Generics Chapter 13: Additional OOP Techniques Chapter 1: Introducing C# ... you'll know him by his brightly colored clothes Christian Nagel is a software architect, trainer, and consultant, and an associate of Thinktecture, offering training and coaching based on Microsoft NET technologies His achievements in the developer... Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 1O/RR/RQ/QV/IN Library of Congress Cataloging-in-Publication Data: Beginning Visual C# 2005 / Karli Watson [et al.] p cm Updated ed of: Beginning Visual C# 2003 Includes index

Ngày đăng: 25/03/2019, 16:32

Mục lục

  • Table of Contents

  • Back Cover

  • Beginning Visual C# 2005

  • Introduction

    • How This Book Is Structured

    • What You Need to Use This Book

    • Conventions

    • Source Code

    • Errata

    • p2p.wrox.com

    • Part I: The C# Language

      • Chapter 1: Introducing C#

        • What Is the .NET Framework?

        • What Is C#?

        • Visual Studio 2005

        • Summary

        • Chapter 2: Writing a C# Program

          • The Visual Studio .NET Development Environment

          • Console Applications

          • Windows Forms Applications

          • Summary

          • Chapter 3: Variables and Expressions

            • Basic C# Syntax

            • Variables

            • Expressions

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan