The professional programmer’s Deitel® guide to C# 2010 and the powerful Microsoft® .NET 4 Framework Written for programmers with a background in C++, Java or other high-level, object-oriented languages, this book applies the Deitel signature live-code approach to teaching programming and explores Microsoft’s C# 2010 language and .NET 4 in depth. The book is updated for Visual Studio® 2010 and C# 4, and presents C# concepts in the context of fully tested programs, complete with syntax shading, detailed line-by-line code descriptions and program outputs. The book features 200+ C# applications with 17,000+ lines of proven C# code, as well as hundreds of programming tips that will help you build robust applications. Start with a concise introduction to C# fundamentals using an early classes and objects approach, then rapidly move on to more advanced topics, including multithreading, .NET 4, LINQ, WPF, ASP.NET 4, WCF web services and Silverlight®. Along the way you’ll enjoy the Deitels’ classic treatment of object-oriented programming and the OOD/UML® ATM case study, including a complete C# implementation. When you’re finished, you’ll be ready to build next-generation Windows applications, web applications and web services. Check out the related LiveLessons video product, C# 2010 Fundamentals: Parts I, II and III, containing 20+ hours of video synchronized to this book: www.deitel.com/livelessons. Practical, example-rich coverage of: .NET 4, Types, Arrays, Exception HandlingLINQ, Object/Collection InitializersOOP: Classes, Objects, Inheritance, Polymorphism, InterfacesWinForms, WPF, XAML, Event HandlingWPF GUI/Graphics/MultimediaSilverlight®Lists, Queues, Stacks, TreesGeneric Collections, Methods and ClassesXML®, LINQ to XMLDatabase, LINQ to SQLASP.NET 4.0, ASP.NET AJAXWeb Forms, Web ControlsWCF Web ServicesOOD/UML® Case Study Visit www.deitel.com For information on Deitel’s Dive Into® training courses offered worldwide visit www.deitel.com/trainingTo license Deitel book and/or LiveLessons video content for your learning management system, e-mail
[email protected] code examplesFollow Deitel on Twitter® @deitel and Facebook® at www.deitel.com/deitelfan/To receive updates for this book, subscribe to the free Deitel® Buzz Online e-mail newsletter at www.deitel.com/newsletter/subscribe.html Testimonials from the Third and Fourth Edition Reviewers “Takes you from zero to the highest levels of C# programming proficiency. The pedagogical approach and wealth of online material guarantee this book an outstanding place among its peers. The best presentation on inheritance, interfaces and polymorphism I have seen in my 25+ years as a trainer and consultant! Superbly clear.” —Octavio Hernandez, Microsoft C# MVP, Advanced Bionics “The ultimate, comprehensive book that teaches you how to program using the latest Microsoft technologies. Excellent explanations, lots of examples, all the necessary theoretical background and all the latest technologies for desktop, web and databases. The best overview of Silverlight.” —Kirill Osenkov, Visual Studio Languages Team, Microsoft “Illustrates the best practices of C# programming.” —Mingsheng Hong, Cornell University “Excellent introduction to the world of .NET for the beginning C# programmer, using the Deitels’ live-code approach and real-world examples.” —Bonnie Berent, Microsoft C# MVP “Shows the practical application of the most recent topics in C# development. A gentle introduction to LINQ and the .NET collection classes; I like it very much! Shows a lot of useful basic techniques and most of the ‘second level facts’ needed to develop WinForms apps. I like the way you introduce working with databases using LINQ to SQL. Excellent introduction to ASP.NET. A very good introduction to generics. Outstanding chapter on collections; the discussion of the new co- and contra-variance capabilities is by necessity short, but very nice.” —Octavio Hernandez, Microsoft C# MVP, Advanced Bionics “The code examples provide a very good start on C# programming. A good job explaining the concepts of classes and objects in plain English. The arrays chapter is well done. A nice introduction to LINQ and Collections. The code examples in the chapter on polymorphism and interfaces are excellent. Important exception-related topics are explained with good examples.” —Zijiang (James) Yang, Western Michigan University “Teaches how to ‘program in the large,’ with material on object-oriented programming and software engineering principles.” —Mingsheng Hong, Cornell University “An excellent, true objects-first book. Excellent introduction to data structures and collections. The generics material is a real asset.” —Gavin Osborne, Saskatchewan Institute of Applied Science and Technology “Great chapter on polymorphism.” —Eric Lippert, Microsoft “Excellent chapter on exceptions. Very good chapter on Winforms GUIs.” —Marcelo Guerra Hahn, Microsoft “Updated contents cover the most important additions to the language while maintaining the Deitels’ well-known high-quality. The early introduction to classes and objects is brilliant. I especially like the explanation of properties, and the discussion of value types vs. reference types. [Classes and Objects: A Deeper Look] does a really good job providing good practices for accessing private data and reusing code. The [Data Structures] chapter is very well written. Coverage of ASP.NET is exceptional.” —José Antonio González Seco, Parliament of Andalusia, Spain “Perfect for professionals. Thorough introductions to the debugger and LINQ.” —Vinay Ahuja, Architect, Microsoft Corporation “The TV/Video Viewer will enthuse readers and help them see how graphics effects can be created easily in WPF.” —Ged Mead, Microsoft MVP, DevCity.Net “An excellent introduction to XML, LINQ to XML and related technologies.”—Helena Kotas, Microsoft “Good overview of relational databases. It hits on the right LINQ to SQL idioms.” —Alex Turner, Microsoft “Great overview of producing and consuming web services with WCF.” —Dan Crevier, Microsoft [Chapter 24: GUI with Windows Presentation Foundation] “This chapter is very well written. I especially liked your coverage of GUI customization and data bindings, which is very clear.” —José Antonio González Seco, Parliament of Andalusia, Spain [Chapter 24: GUI with Windows Presentation Foundation] “Excellent chapter! Everything is laid out right so that every required bit of knowledge is already there when needed.” —Octavio Hernandez, Microsoft C# MVP, Advanced Bionics [Chapter 25: WPF Graphics and Multimedia] “An already excellent chapter that got even better! This chapter perfectly complements the previous one, and offers great exa...