You are previewing C# 5 First Look.
O'Reilly logo
C# 5 First Look

Book Description


A first look at the latest version of C#; learning how to write ultra-responsive applications using the new asynchronous language features.

  • Learn about all the latest features of C#, including the asynchronous programming capabilities that promise to make apps ultra-responsive

  • Examine how C# evolved over the years to be more expressive, easier to write, and how those early design decisions enabled future innovations

  • Explore the language’s bright future building applications for other platforms using the Mono Framework

  • In Detail

    C# is a wonderfully expressive and powerful language that lets you focus on your application rather than low level boilerplate. Over the last decade, the C# compiler has evolved to include many features from dynamic and functional languages, all while remaining statically typed. Most recently, it also tackles the proliferation of concurrent hardware with new asynchronous programming features.

    ""C# 5 First Look"" will help you get up to speed on the latest version of the language. You will learn the underlying principles of the design by exploring its evolution, then look at the asynchronous and concurrent programming facilities of the Task Parallel Framework, and the new async and await keywords. The book also takes you through the development of real-world applications for Windows 8, ASP.NET, and MacOS, using the Mono Framework.

    "C# 5 First Look" will help you get up to speed on the latest version of C#. After setting up your development environment, you will go on a tour of all features of the language, including: the Task Parallel Framework, Dynamic Language Runtime, TPL Data Flow, and finally asynchronous programming with async and await.

    "C# 5 First Look" will help you get up to speed on the latest version of C#. We will discuss the tools you need to get started, including Visual Studio and MonoDevelop. Once set up, we look at the highlights of the language’s evolution over every version and discuss how the framework’s design and language features contribute to the high productivity you experience as a C# programmer. Next we check out the asynchronous and concurrent programming features of the language, which help you write fast and responsive applications. Finally, the book presents and explains three fully featured pieces of software that demonstrate writing applications for the Windows Store, the Web, and MacOS with the Mono Framework.

    "C# 5 First Look" is a look at the evolution of C#. You will learn how to write great apps on all platforms using modern C# language features. Whether you are targeting the desktop, mobile, or web, C# 5 First Look has you covered.


    Table of Contents

    1. C# 5 First Look
      1. Table of Contents
      2. C# 5 First Look
      3. Credits
      4. About the Author
      5. About the Reviewers
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
          3. Instant Updates on New Packt Books
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Getting Started with C#
        1. Origins
          1. C# is born
        2. The tools
          1. Visual Studio
            1. Full versions of Visual Studio
            2. Licensing
            3. Express
            4. Using Visual Studio
              1. Command-line compiler
              2. SharpDevelop
              3. MonoDevelop
        3. Summary
      9. 2. Evolution of C#
        1. C# 1.0 – in the beginning
          1. Runtime
          2. Memory management
          3. Syntax features
          4. Base Class Library
        2. C# 2.0
          1. Syntax updates
          2. Anonymous methods
          3. Partial classes
          4. Generics
          5. Generic collections
          6. Iterator methods
        3. C# 3.0
          1. Syntax updates
          2. LINQ
          3. Extension methods
        4. C# 4.0
        5. Summary
      10. 3. Asynchrony in Action
        1. Asynchrony
          1. Task Parallel Library
            1. Task composability
            2. Error handling with tasks
          2. async and await
            1. Composing async calls
            2. Error handling with async methods
            3. Impact of async
          3. Improvements in .NET 4.5 Framework
            1. TPL DataFlow
            2. ActionBlock<T>
            3. TransformBlock<T>
            4. BatchBlock
            5. BroadcastBlock
            6. Async I/O
          4. Caller attributes
        2. Summary
      11. 4. Creating a Windows Store App
        1. Making a Flickr browser
          1. Getting the project started
          2. Connecting to Flickr
          3. Creating the UI
        2. Summary
      12. 5. Mobile Web App
        1. Mobile Web with ASP.NET MVC
          1. Building a MeatSpace tracker
            1. Iteration zero
            2. Going asynchronous
          2. Getting the user's location
            1. Broadcasting with SignalR
            2. Mapping users
          3. Testing the app
        2. Summary
      13. 6. Cross-platform Development
        1. Building a web scraper
        2. Building the model
          1. Accessing the Web
          2. Making a DataSource
        3. Building the view
        4. Summary
      14. Index