How to Code .NET.pdf

(1601 KB) Pobierz
374619733 UNPDF
THE EXPERT’S VOICE ® IN .NET
Code .NET
Tips and Tricks for Coding .NET 1.1
and .NET 2.0 Applications Effectively
Christian Gross
How to
374619733.043.png 374619733.057.png 374619733.001.png 374619733.002.png 374619733.003.png 374619733.004.png 374619733.005.png 374619733.006.png 374619733.007.png 374619733.008.png 374619733.009.png 374619733.010.png 374619733.011.png 374619733.012.png 374619733.013.png 374619733.014.png 374619733.015.png 374619733.016.png 374619733.017.png 374619733.018.png 374619733.019.png 374619733.020.png 374619733.021.png
 
374619733.022.png
 
374619733.023.png
 
374619733.024.png
 
374619733.025.png
 
374619733.026.png 374619733.027.png 374619733.028.png 374619733.029.png 374619733.030.png 374619733.031.png 374619733.032.png 374619733.033.png 374619733.034.png 374619733.035.png 374619733.036.png
 
374619733.037.png 374619733.038.png 374619733.039.png 374619733.040.png 374619733.041.png 374619733.042.png 374619733.044.png 374619733.045.png 374619733.046.png 374619733.047.png 374619733.048.png 374619733.049.png 374619733.050.png
 
How to Code .NET
Tips and Tricks for Coding
.NET 1.1 and .NET 2.0
Applications Effectively
Christian Gross
374619733.051.png 374619733.052.png 374619733.053.png
How to Code .NET: Tips and Tricks for Coding .NET 1.1 and .NET 2.0 Applications Effectively
Copyright © 2006 by Christian Gross
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN-13 (pbk): 978-1-59059-744-6
ISBN-10 (pbk): 1-59059-744-3
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
Lead Editor: Ewan Buckingham
Technical Reviewer: Jason Lefebvre
Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan Gennick,
Jonathan Hassell, James Huddleston, Chris Mills, Matthew Moodie, Dominic Shakeshaft, Jim Sumser,
Keir Thomas, Matt Wade
Project Manager: Richard Dal Porto
Copy Edit Manager: Nicole Flores
Copy Editors: Candace English, Nicole Abramowitz
Assistant Production Director: Kari Brooks-Copony
Production Editor: Kelly Gunther
Compositor: Gina Rexrode
Proofreader: Linda Seifert
Indexer: Michael Brinkman
Artist: April Milne
Cover Designer: Kurt Krames
Manufacturing Director: Tom Debolski
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com , or
visit http://www.springeronline.com .
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley,
CA 94710. Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com , or visit http://www.apress.com .
The information in this book is distributed on an “as is” basis, without warranty. Although every precau-
tion has been taken in the preparation of this work, neither the author(s) nor Apress shall have any
liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly
or indirectly by the information contained in this work.
The source code for this book is available to readers at http://www.apress.com in the Source Code/
Download section.
374619733.054.png
Contents at a Glance
About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
CHAPTER 1 Testing Your Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
CHAPTER 2 .NET Runtime- and Framework-Related Solutions . . . . . . . 31
CHAPTER 3 Text-Related Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
CHAPTER 4 C# Coding Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
iii
374619733.055.png
374619733.056.png
Zgłoś jeśli naruszono regulamin