TERMS OF USE This is a copyrighted work and The McGraw-Hill Companies, Inc.. “McGraw-Hill” and its licensors reserve all rights in and to the work.. Except as permitted under the Copyrig
Trang 2Advanced C# Programming
Trang 3About the Author
Paul Kimmel founded Software Conceptions, Inc., in Okemos, Michigan in 1990 Paul specializes in object-oriented architecture and software design He is the frameworks columnist
for Windows Developer Magazine, a bimonthly columnist for codeguru.com, and a contributing columnist to InformIT Paul has written several books on object-oriented programming He is
currently the lead architect for a C# and ASP.NET enterprise application for managing the corrections division of the sherrif’s office in Oregon, and he has successfully implemented dozens of corporate and commercial applications in the telecom, insurance, and financial industries and for law enforcement and government agencies, with customers throughout the United States, Canada, and Puerto Rico
Trang 4Advanced C# Programming
Paul Kimmel
McGraw-Hill/Osborne
New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul
Trang 5Copyright © 2002 by The McGraw-HIll Companies, Inc All rights reserved Manufactured in the United States of America 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
0-07-222828-8
The material in this eBook also appears in the print version of this title: 0-07-222417-7
All trademarks are trademarks of their respective owners Rather than put a trademark symbol after every occur-rence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark Where such designations appear in this book, they have been printed with initial caps
McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training programs For more information, please contact George Hoare, Special Sales, at george_hoare@mcgraw-hill.com or (212) 904-4069
TERMS OF USE
This is a copyrighted work and The McGraw-Hill Companies, Inc (“McGraw-Hill”) and its licensors reserve all rights in and to the work Use of this work is subject to these terms Except as permitted under the Copyright Act
of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish
or sublicense the work or any part of it without McGraw-Hill’s prior consent You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited Your right to use the work may be terminated if you fail to comply with these terms
THE WORK IS PROVIDED “AS IS” McGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES
OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WAR-RANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE McGraw-Hill and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom McGraw-Hill has no responsibility for the content of any information accessed through the work Under no cir-cumstances shall McGraw-Hill and/or its licensors be liable for any indirect, incidental, special, punitive, conse-quential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages This limitation of liability shall apply to any claim or cause whatso-ever whether such claim or cause arises in contract, tort or otherwise
DOI: 10.1036/0072228288
Trang 6defined, 171
implementing, 194–196
registering, 196–197
running from command window, 197–198
testing, 173–174
testing with macros, 197
Wizards, creating custom, 170–174
creating wizard projects, 172
implementing IDTWizard interface, 172
passing arguments by reference, 173
testing wizards, 173–174
Wizards, creating project templates for Visual
Studio NET, 175–184
adding files for Wizard Library templates,
177–178
copying existing project templates, 176–177
creating VSDir files, 182–184
creating wizard launch file, 181–182
modifying common.js script, 180–181
modifying default.js script, 178–180
Wizards, extending Visual Studio NET with,
184–198
completing sample wizard launch files, 196
creating code generators, 188–191
implementing wizard user interface,
191–194
implementing wizards, 194–196
introduction to Common Environment
Object Model, 186–187
registering wizards, 196–197
running wizards from command window,
197–198
testing wizards with macros, 197 writing code with macros, 187–188 writing macros, 185–186
Write-only properties, 14 Writing
code with macros, 187–188 debug information to Output window, 225
to EventLog, 204–205
to FileStream, 131–132 lines of OpCodes, 355–362 macros, 185–186
X
XML control loading XML documents with, 460–462 loading XSL documents with, 460–462 XML documents
loading with XML control, 460–462 reviewing, 457–458
XML Web Services programming, 107–111
in Terrarium, 107 XML/XSL transform modules, implementing, 457–462
XSL documents, loading with XML control, 460–462
XSL documents, reviewing, 459–460 selecting data conditionally, 460 sorting XML, 460
I n d e x 5 5 1
Trang 7INTERNATIONAL CONTACT INFORMATION
AUSTRALIA
McGraw-Hill Book Company Australia Pty Ltd
TEL +61-2-9415-9899
FAX +61-2-9415-5687
http://www.mcgraw-hill.com.au
books-it_sydney@mcgraw-hill.com
CANADA
McGraw-Hill Ryerson Ltd
TEL +905-430-5000
FAX +905-430-5020
http://www.mcgrawhill.ca
GREECE, MIDDLE EAST,
NORTHERN AFRICA
McGraw-Hill Hellas
TEL +30-1-656-0990-3-4
FAX +30-1-654-5525
MEXICO (Also serving Latin America)
McGraw-Hill Interamericana Editores S.A de C.V
TEL +525-117-1583
FAX +525-117-1589
http://www.mcgraw-hill.com.mx
fernando_castellanos@mcgraw-hill.com
SINGAPORE (Serving Asia)
McGraw-Hill Book Company TEL +65-863-1580
FAX +65-862-3354 http://www.mcgraw-hill.com.sg mghasia@mcgraw-hill.com
SOUTH AFRICA
McGraw-Hill South Africa TEL +27-11-622-7512 FAX +27-11-622-9045 robyn_swanepoel@mcgraw-hill.com
UNITED KINGDOM & EUROPE (Excluding Southern Europe)
McGraw-Hill Education Europe TEL +44-1-628-502500 FAX +44-1-628-770224 http://www.mcgraw-hill.co.uk computing_neurope@mcgraw-hill.com
ALL OTHER INQUIRIES Contact:
Osborne/McGraw-Hill TEL +1-510-549-6600 FAX +1-510-883-7600 http://www.osborne.com omg_international@mcgraw-hill.com