C# 5.0 Unleashed


C# 5.0 Unleashed is for anyone who wants to really learn the C# programming language in depth, and understand how its features truly work. You’ll learn where and how to use the language’s features to solve diverse problems and design each kind of software. Pioneering Microsoft software expert Bart De Smet takes you behind the scenes, giving you a rock-solid foundation for understanding both the WinRT and .NET platforms, so you can take full advantage of C# 5.0, consistently choose the right language and platform ...

See more details below
BN.com price
(Save 27%)$59.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (14) from $31.12   
  • New (12) from $33.97   
  • Used (2) from $31.12   
C# 5.0 Unleashed

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK 7.0
  • Samsung Galaxy Tab 4 NOOK 10.1
  • NOOK HD Tablet
  • NOOK HD+ Tablet
  • NOOK eReaders
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac

Want a NOOK? Explore Now

NOOK Book (eBook)
BN.com price
(Save 42%)$47.99 List Price


C# 5.0 Unleashed is for anyone who wants to really learn the C# programming language in depth, and understand how its features truly work. You’ll learn where and how to use the language’s features to solve diverse problems and design each kind of software. Pioneering Microsoft software expert Bart De Smet takes you behind the scenes, giving you a rock-solid foundation for understanding both the WinRT and .NET platforms, so you can take full advantage of C# 5.0, consistently choose the right language and platform features, and maximize your efficiency and effectiveness as a developer.

De Smet begins with focused and up-to-date introductions to the .NET platform, Microsoft’s tooling ecosystem (including the new Visual Studio 2012), and Microsoft’s newest version of C#. Next, he presents in-depth coverage of C# 5.0’s features, demonstrating them through realistic code examples. De Smet then turns to WinRT, Windows 8, and async programming, showing how to take full advantage of Microsoft’s newest platforms and innovations.

Read More Show Less

Product Details

  • ISBN-13: 9780672336904
  • Publisher: Sams
  • Publication date: 5/6/2013
  • Series: Unleashed Series
  • Edition number: 1
  • Pages: 1711
  • Sales rank: 678,470
  • Product dimensions: 7.00 (w) x 9.10 (h) x 2.40 (d)

Meet the Author

Bart J.F. De Smet is a software development engineer on Microsoft’s Cloud Programmability Team, an avid blogger, and a popular speaker at various international conferences. In his current role, he’s actively involved in the design and implementation of Reactive Extensions for .NET (Rx) and on an extended “LINQ to Anything” mission. You can read about Bart’s technical adventures on his blog at http://blogs.bartdesmet.net/bart.

His main interests include programming languages, virtual machines and runtimes, functional programming, and all sorts of theoretical foundations. In his spare time, Bart likes to go out for a hike in the wonderful nature around Seattle, read technical books, and catch up on his game of snooker.

Before joining the company in October 2007, Bart was active in the .NET community as a Microsoft Most Valuable Professional (MVP) for C#, while completing his Bachelor of Informatics, Master of Informatics, and Master of Computer Science Engineering studies at Ghent University, Belgium.

Read More Show Less

Table of Contents

Introduction 1

Who Should Read This Book? 2

What You Need to Know Before You Read This Book 2

How This Book Is Organized 3

1 Introducing the NET Platform 5

A Historical Perspective 5

A 10,000-Feet View of the NET Platform. 9

The Common Language Infrastructure 12

The Multilanguage Aspect of NET 15

Introducing NET Assemblies. 16

The Common Type System Explained 17

Executing Managed Code 24

Diving into the Common Language Runtime 32

The Base Class Library 51

Summary 54

2 Introducing the C# Programming Language 55

The Evolution of C# 55

A Sneak Peek at the Future 95

Summary 102

3 Getting Started with NET Development Using C# 103

Installing the NET Framework 103

Your First Application: Take One 113

Visual Studio 2012 119

Your First Application: Take Two 127

Summary 173

4 Language Essentials 175

The Entry Point 175

Keywords 181

A Primer on Types 184

Built-In Types 190

Local Variables. 212

Intermezzo on Comments 223

Arrays 230

The Null Reference 239

Nullable Value Types 243

Summary 249

5 Expressions and Operators 251

What Are Expressions? 251

The Evaluation Stack 255

Arithmetic Operators 258

String Concatenation 269

Shift Operators 274

Relational Operators 275

Logical Operators 277

Conditional Operators 281

An Operator’s Result Type 284

Null-Coalescing Operator 285

Assignment 287

Summary 299

6 A Primer on Types and Objects 301

Implicit Versus Explicit Conversions 301

The typeof Operator: A Sneak Peek at Reflection 319

Default Value Expression 322

Creating Objects with the new Operator 324

Member Access 336

Invocation Expressions 340

Element Access 348

Summary 349

7 Simple Control Flow 351

What Are Statements, Anyway? 351

Expression Statements 353

The Empty Statement 355

Statement Blocks. 356

Declarations 357

Selection Statements 358

Iteration Statements 375

A Peek at Iterators 391

Loops in the Age of Concurrency 398

The goto Statement 400

The return Statement 404

Summary 406

8 Basics of Exceptions and Resource Management 407

Exception Handling 407

Deterministic Resource Cleanup 438

Locking on Objects 448

Summary 462

9 Introducing Types 463

Types Revisited 463

Classes Versus Structs 466

Type Members 486

Summary 499

10 Methods 501

Defining Methods 501

Specifying the Return Type 502

Declaring Parameters 504

Overloading 519

Extension Methods 524

Partial Methods 534

Extern Methods 538

Refactoring 540

Code Analysis 545

Summary 546

11 Fields, Properties, and Indexers 547

Fields 547

An Intermezzo About Enums 563

Properties 574

Indexers 580

Summary 583

12 Constructors and Finalizers 585

Constructors 585

Static Constructors 592

Destructors (Poorly Named Finalizers) 595

Summary 608

13 Operator Overloading and Conversions 609

Operators 609

Conversions 633

Summary 647

14 Object-Oriented Programming 649

The Cornerstones of Object Orientation 649

Inheritance for Classes 663

Protected Accessibility 674

Polymorphism and Virtual Members 676

Abstract Classes 688

Interface Types 690

Summary 699

15 Generic Types and Methods 701

Life Without Generics 701

Getting Started with Generics 704

Declaring Generic Types 707

Using Generic Types 712

Performance Intermezzo 714

Operations on Type Parameters 718

Generic Constraints 720

Generic Methods 736

Co- and Contravariance 743

Summary 754

16 Collection Types 755

Nongeneric Collection Types 755

Generic Collection Types 765

Thread-Safe Collection Types 778

Other Collection Types 786

Summary 787

17 Delegates 789

Functional Programming 789

What Are Delegates? 794

Delegate Types 794

Delegate Instances 798

Invoking Delegates 811

Putting It Together: An Extensible Calculator 815

Case Study: Delegates Used in LINQ to Objects 819

Asynchronous Invocation 823

Combining Delegates 835

Summary 842

18 Events 843

The Two Sides of Delegates 844

A Reactive Application 845

How Events Work 853

Raising Events, the Correct Way 855

add and remove Accessors 857

Detach Your Event Handlers 861

Recommended Event Patterns 871

Case Study: INotifyProperty Interfaces and UI Programming 880

Countdown, the GUI Way 890

Event Interoperability with WinRT 896

Introduction to Reactive Programming 898

Summary 911

19 Language Integrated Query Essentials 913

Life Without LINQ 914

LINQ by Example 921

Query Expression Syntax 931

Summary 975

20 Language Integrated Query Internals 977

How LINQ to Objects Works 977

Standard Query Operators 1000

The Query Pattern 1033

Parallel LINQ 1036

Expression Trees 1045

Summary 1055

21 Reflection 1057

Typing Revisited, Static and Otherwise. 1058

Reflection 1063

Lightweight Code Generation 1091

Expression Trees 1101

Summary 1117

22 Dynamic Programming 1119

The dynamic Keyword in C# 4.0 1119

DLR Internals 1137

Office and COM Interop 1159

Summary 1174

23 Exceptions 1175

Life Without Exceptions 1175

Introducing Exceptions 1178

Exception Handling 1180

Throwing Exceptions 1196

Defining Your Own Exception Types 1198

(In)famous Exception Types 1201

Summary 1220

24 Namespaces 1221

Organizing Types in Namespaces 1221

Declaring Namespaces 1227

Importing Namespaces 1231

Summary 1240

25 Assemblies and Application Domains 1241

Assemblies 1241

Application Domains 1286

Summary 1298

26 Base Class Library Essentials 1301

The BCL: What, Where, and How? 1303

The Holy System Root Namespace 1311

Facilities to Work with Text 1356

Summary 1372

27 Diagnostics and Instrumentation 1373

Ensuring Code Quality 1374

Instrumentation 1388

Controlling Processes 1396

Summary 1398

28 Working with I/O 1399

Files and Directories 1399

Monitoring File System Activity 1407

Readers and Writers 1409

Streams: The Bread and Butter of I/O 1415

A Primer to (Named) Pipes 1434

Memory-Mapped Files in a Nutshell 1437

Overview of Other I/O Capabilities 1440

Summary 1440

29 Threading and Synchronization 1443

Using Threads 1444

Thread Pools 1474

Synchronization Primitives 1482

Summary 1511

30 Task Parallelism and Data Parallelism 1513

Pros and Cons of Threads 1514

The Task Parallel Library 1515

Task Parallelism 1520

Data Parallelism 1542

Summary 1550

31 Asynchronous Programming 1551

Why Asynchronous Programming Matters 1551

Old Asynchronous Programming Patterns 1564

Asynchronous Methods and await Expressions 1584

Behind the Scenes 1610

Advanced Topics 1634

Summary 1641

32 Introduction to Windows Runtime 1643

What Is Windows Runtime? 1643

Creating a Windows Runtime Component 1658

Overview of the Windows Runtime APIs 1667

Summary 1669

Index 1671

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)