C#6.0andthe.NET4.6Framework
This new 7th edition of Pro C# 6.0 and the .NET 4.6 Platform has been completely revised and rewritten to reflect the latest changes to the C# language specification and new advances in the .NET Framework. You'll find new chapters covering all the important new features that make .NET 4.6 the most cC#6.0 and the. net 4.6 frameworkCopyright c 20 1 5 by Andrew Troelsen and philip japikseThis work is subject to copyright. All rights are reserved by the Publisher, whetherthe whole or part of the material is concerned, specifically the rights of translation,reprinting, reuse of illustrations, recitation, broadcasting, reproduction onmicrofilms or in any other physical way, and transmission or information storageand retrieval, electronic adaptation, computer software, or by similar or dissimilarmethodology now known or hereafter developed. Exempted from this legalreservation are brief excerpts in connection with reviews or scholarly analysis ormaterial supplied specifically for the purpose of being entered and executed on acomputer system, for exclusive use by the purchaser of the work. Duplication ofthis publication or parts thereof is permitted only under the provisions of theCopyright Law of the Publisher's location, in its current version, and permissionfor use must always be obtained from Springer. Permissions for use may beobtained through rightsLink at the Copyright Clearance Center. violations areliable to prosecution under the respective Copyright LawISBN-13(pbk):978-1-4842-1333-9ISBN-13( electronic):978-1-4842-1332-2Trademarked names, logos, and images may appear in this book. Rather than use atrademark symbol with every occurrence of a trademarked name, logo, or imagewe use the names, logos, and images only in an editorial fashion and to the benefitof the trademark owner, with no intention of infringement of the trademarkThe use in this publication of trade names, trademarks, service marks, and similarterms, even if they are not identified as such, is not to be taken as an expression ofopinion as to whether or not they are subject to proprietary rightsWhile the advice and information in this book are believed to be true and accurateat the date of publication, neither the authors nor the editors nor the publisher canaccept any legal responsibility for any errors or omissions that may be made. Thepublisher makes no warranty, express or implied, with respect to the materiacontained hereinManaging Director: Welmoed SpahrLead Editor: James De WolfTechnical Reviewer Andy olsenDevelopment Editor: Douglas PundickEditorial Board: Steve Anglin, Mark Beckner, Gary Cornell, LouiseCorrigan, Jim De Wolf, Jonathan Gennick, Robert hutchinsonMichelle lowman, James Markham. Susan McDermott. MatthewMoodie, Jeffrey Pepper, Douglas Pundick, Ben Renow-ClarkeGwenan Spearing, Matt Wade, Steve WeissCoordinating Editor: Melissa MaldonadoCopy Editors: Mary Behr, Kim WimpsettCompositor SPi GlobalIndexer: SPi globalArtist: sPi globalDistributed to the book trade worldwide by Springer Science+ Business Media NewYork, 233 Spring Street, 6th Floor, New York, NY10013 Phone 1-800SPRINGER, fax(201)348-4505, e-mail orders-nyaspringer-sbm comorvisitwww.springercomApressMedia,LlcisaCalifoniaLlcandthesole member(owner)is Springer Science Business Media Finance Inc(SSBMFinance Inc). SSBM Finance Inc is a delaware corporationFor information on translations, please e-mail rightsdapress com, or visitWww. apress. comApress and friends of ed books may be purchased in bulk for academiccorporate. or promotional use eBook versions and licenses are also available formost titles. For more information, reference our Special bulk Sales-eBookLicensingwebpageatwww.apress.com/bulk-salesAny source code or other supplementary material referenced by the author in thistextisavailabletoreadersatwww.apress.comfordetailedinformationabouthowtolocateyourbookssourcecodegotowww.apress.com/sourcecode/the entire Troelsen clan: Mary(mom), Walter (dad), Mandy(wife)and Soren(son). We miss you, Mikko(the cat. AndrewTo my family, Amy(wife), Conner(son), Logan(son ), and Skylar(daughter), thank you for all of the support and patience you havegiven me. PhilipContents at a glanceAbout the authorsAbout the Technical reviewerAcknowledgmentsIntroductionPart I: Introducing C# and the NET PlatformChapter 1: The Philosophy of NETChapter 2: Building Ct ApplicationsPart II: Core C# ProgrammingChapter 3: Core C+ Programming Constructs, Part IChapter 4: Core C# Programming Constructs, Part IIPart Ill: Object-Oriented Programming with C#Chapter 5: Understanding EncapsulationChapter 6: Understanding Inheritance and polymorphismChapter 7: Understanding Structured Exception HandlingChapter 8: Working with InterfacesPart IV: Advanced C# ProgrammingChapter 9: Collections and GenericsChapter 10: Delegates, Events, and Lambda ExpressionsChapter 11: Advanced c# Language FeaturesChapter 12: LiNQ to ObjectsChapter 13: Understanding Object LifetimePart V: Programming with .NET AssembliesChapter 14: Building and Configuring Class LibrariesChapter 15: Type Reflection, Late Binding, and AttributeBased ProgrammingChapter 16: Dynamic Types and the dynamic languageRuntimeChapter 17: Processes, AppDomains, and Object ContextsChapter 18: Understanding CIL and the role of dynamicAssembliesPart vi: introducing the net Base classLibrariesChapter 19: Multithreaded, Parallel, and AsyncProgrammingChapter 20: File 1/O and object serializationChapter 21: ADO.NET Part I: The Connected LayerChapter 22: ADO. NET Part II: The Disconnected LayerChapter 23: ADO. NET Part Il: Entity FrameworkChapter 24: Introducing LiNQ to XMLChapter 25: Introducing windows CommunicationFoundationPart vil: windows presentation foundationChapter 26: Introducing Windows Presentation Foundationand XAMLChapter 27: Programming with WPF ControlsChapter 28: WPF Graphics Rendering servicesChapter 29: WPF Resources, Animations, Styles, andTemplatesChapter 30: Notifications, Commands, validation, andMVVMPart VI: ASP.NeTChapter 31: Introducing asp.net Web formsChapter 32: ASP.NET Web Controls, Master Pages, andTHemesChapter 33: ASP.NET State Management TechniquesChapter 34: ASP.NET MVC and Web APIIndexContentsAbout the authorsAbout the Technical reviewerAcknowledgmentsIntroductionPart I: Introducing C# and the NET PlatformChapter 1: The Philosophy of. NETAn initial look at the net platformSome Key benefits of the. NET PlatformIntroducing the Building blocks of the. NET Platform(the CLR, Cts,and CLS)The Role of the Base Class LibrariesWhat C# Brings to the TableManaged vs Unmanaged CodeAdditional. NET-Aware Programming LanguagesLife in a multilanguage WorldAn Overview of. NEt assembliesThe role of the Common Intermediate LanguageBenefits of CILCompiling Cil to Platform-Specific InstructionsThe role of. NEt Type metadataThe role of the Assembly ManifestUnderstanding the Common Type SystemCTS Class TypesCTS Interface TypesCTS Structure TypesCTS Enumeration TypesCTS Delegate TypesCTS Type MembersIntrinsic CTs Data TypesUnderstanding the common language specificationEnsuring CLS ComplianceUnderstanding the Common Language RuntimeThe Assembly/Namespace/Type DistinctionThe role of the Microsoft root namespaceAccessing a Namespace ProgrammaticallyReferencing External assembliesExploring an Assembly Using ildasm.exeViewing cIl codeViewing Type MetadataViewing Assembly Metadata (aka the Manifest)The Platform-Independent Nature of. NETThe Mono ProjectMicrosoft net coreSummaryChapter 2: Building C# ApplicationsBuilding C# Applications on the Windows OsThe Visual studio express family of IDesThe Visual Studio Community Edition IDEThe Visual studio 2015 professional ideThe. NET Framework Documentation SystemBuilding. NET Applications Beyond the windows OsThe role of Amarin studioSummaryPart II: Core C# ProgrammingChapter 3: Core C# Programming Constructs, Part IThe Anatomy of a Simple C# ProgramVariations on the Main()MethodSpecifying an application Error CodeProcessing Command-Line ArgumentsSpecifying Command-Line Arguments with Visual StudioAn Interesting aside: Some Additional members of theSystem Environment ClassThe System. Console ClassBasic Input and Output with the Console ClassFormatting Console OutputFormatting Numerical DataFormatting Numerical Data Beyond Console ApplicationsSystem Data Types and Corresponding C# Key words
用户评论