Programming C# 5.0: Building Windows 8, Web, and Desktop Applications for the .NET 4.5 Framework

Programming C# 5.0: Building Windows 8, Web, and Desktop Applications for the .NET 4.5 Framework

Ian Griffiths

Language: English

Pages: 886

ISBN: 1449320414

Format: PDF / Kindle (mobi) / ePub


After a dozen years of incremental changes, C# has become one of the most versatile programming languages available. With this comprehensive guide, you’ll learn just how powerful the combination of C# 5.0 and .NET 4.5 can be. Author Ian Griffiths guides you through C# 5.0 fundamentals and teaches you techniques for building web and desktop applications, including Windows 8-style apps.

Completely rewritten for experienced programmers, this book provides many code examples to help you work with the nuts and bolts of C# code, such as generics, dynamic typing, and the new asynchronous programming features. You’ll also get up to speed on XAML, ASP.NET, LINQ, and other .NET tools.

  • Discover how C# supports fundamental coding features such as classes, other custom types, collections, and error handling
  • Understand the differences between dynamic and static typing in C#
  • Query and process diverse data sources such as in-memory object models, databases, and XML documents with LINQ
  • Use .NET’s multithreading features to exploit your computer’s parallel processing capabilities
  • Learn how the new asynchronous language features can help improve application responsiveness and scalability
  • Use XAML to create Windows 8-style, phone, and classic desktop applications

Starting Out with Java: From Control Structures through Objects (5th Edition)

The Business of Android Apps Development: Making and Marketing Apps that Succeed on Google Play, Amazon Appstore and More

Taming Text: How to Find, Organize, and Manipulate It

Test-Driven iOS Development (Developer's Library)

MacRuby: The Definitive Guide: Ruby and Cocoa on OS X

Getting Started with Raspberry Pi

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

in the normal way shown in Chapter 9, and with no obvious advantage. And in this particular example, that would have been better. However, one obvious benefit of using Rx is that if you were writing a user interface application, you could use ObserveOn with a suitable scheduler to ensure that your handler was always invoked on the right thread, regardless of which thread raised the event. Of course, another benefit—and the usual reason for doing this—is that you can use any of Rx’s query

calculations, this doesn’t really matter; in simulations or signal processing, for example, some noise and error is expected. But accountants tend to be less forgiving—little discrepancies like this can make it look like money has magically vanished or appeared. We need calculations that involve money to be absolutely accurate, which makes floating point a terrible choice for such work. So C# also offers the decimal type, which provides a well-defined level of decimal precision. Note Most

{0}", ralphCopy); } } I’ve structured the data so that there are circular references. The bart variable refers to an object whose Friends property returns a collection that contains references to two more Person objects. (List has the [Serializable] attribute, by the way.) But, of course, each of those has a Friends property containing a collection that refers back to Bart—we have a circular reference. (There’s also a noncircular reference from Ralph to an imaginary friend, Wiggle Puppy.)

class, Searching and Sorting First operator, Specific Items and Subranges, Aggregation, Aggregation and Other Single-Value Operators FirstAsync operator, Aggregation and Other Single-Value Operators FirstOrDefault operator, Specific Items and Subranges, Aggregation, Aggregation and Other Single-Value Operators fixed keyword, Accidentally Defeating Compaction, Unsafe Code flags-based enumerations, Enums FlattenHierarchy value, BindingFlags, Assembly floating-point numbers, float and double

series of quite diverse-seeming capabilities were added. These included better support for functional programming idioms, the ability to add new methods to existing types without resorting to inheritance, support for anonymous types, the ability to obtain an object model representing the structure of an expression, and the introduction of query syntax. The last of these has an obvious connection to data access, but the rest are harder to relate to the task at hand. Nonetheless, these can be used

Download sample

Download