Skip to main content

Professional C# 2012 and .NET 4.5

Professional C# 2012 and .NET 4.5

Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner

ISBN: 978-1-118-33212-2

Oct 2012

1584 pages

$38.99

Description

Intermediate to advanced technique coverage, updated for C# 2012 and .NET 4.5

This guide is geared towards experienced programmers looking to update and enhance their skills in writing Windows applications, web apps, and Metro apps with C# and .NET 4.5. Packed with information about intermediate and advanced features, this book includes everything professional developers need to know about C# and putting it to work.

  • Covers challenging .NET features including Language Integrated Query (LINQ), LINQ to SQL, LINQ to XML, WCF, WPF, Workflow, and Generics
  • Puts the new Async keyword to work and features refreshers on .NET architecture, objects, types, inheritance, arrays, operators, casts, delegates, events, strings, regular expressions, collections, and memory management
  • Explores new options and interfaces presented by Windows 8 development, WinRT, and Metro style apps
  • Includes traditional Windows forms programming, ASP.NET web programming with C#, and working in Visual Studio 2012 with C#

Professional C# 2012 and .NET 4.5 is a comprehensive guide for experienced programmers wanting to maximize these technologies.

INTRODUCTION xlix

PART I: THE C# LANGUAGE

CHAPTER 1: .NET ARCHITECTURE 3

CHAPTER 2: CORE C# 23

CHAPTER 3: OBJECTS AND TYPES 65

CHAPTER 4: INHERITANCE 89

CHAPTER 5: GENERICS 107

CHAPTER 6: ARRAYS AND TUPLES 129

CHAPTER 7: OPERATORS AND CASTS 151

CHAPTER 8: DELEGATES, LAMBDAS, AND EVENTS 183

CHAPTER 9: STRINGS AND REGULAR EXPRESSIONS 209

CHAPTER 10: COLLECTIONS 229

CHAPTER 11: LANGUAGE INTEGRATED QUERY 279

CHAPTER 12: DYNAMIC LANGUAGE EXTENSIONS 313

CHAPTER 13: ASYNCHRONOUS PROGRAMMING 325

CHAPTER 14: MEMORY MANAGEMENT AND POINTERS 347

CHAPTER 15: REFLECTION 375

CHAPTER 16: ERRORS AND EXCEPTIONS 393

PART II: VISUAL STUDIO

CHAPTER 17: VISUAL STUDIO 2012 417

CHAPTER 18: DEPLOYMENT 467

PART III: FOUNDATION

CHAPTER 19: ASSEMBLIES 487

CHAPTER 20: DIAGNOSTICS 519

CHAPTER 21: TASKS, THREADS, AND SYNCHRONIZATION 551

CHAPTER 22: SECURITY 601

CHAPTER 23: INTEROP 627

CHAPTER 24: MANIPULATING FILES AND THE REGISTRY 661

CHAPTER 25: TRANSACTIONS 705

CHAPTER 25: TRANSACTIONS 705

CHAPTER 27: WINDOWS SERVICES 771

CHAPTER 28: LOCALIZATION? 803

CHAPTER 29: CORE XAML 845

CHAPTER 30: MANAGED EXTENSIBILITY FRAMEWORK 863

CHAPTER 31: WINDOWS RUNTIME 893

PART IV: DATA

CHAPTER 32: CORE ADO.NET 917

CHAPTER 33: ADO.NET ENTITY FRAMEWORK 963

CHAPTER 34: MANIPULATING XML 995

PART V: PRESENTATION

CHAPTER 35: CORE WPF 1049

CHAPTER 36: BUSINESS APPLICATIONS WITH WPF 1101

CHAPTER 37: CREATING DOCUMENTS WITH WPF 1153

CHAPTER 38: WINDOWS STORE APPS 1175

CHAPTER 39: CORE ASP.NET 1211

CHAPTER 40: ASP.NET WEB FORMS 1239

CHAPTER 41: ASP.NET MVC 1283

CHAPTER 42: ASP.NET DYNAMIC DATA 1321

PART VI: COMMUNICATION

CHAPTER 43: WINDOWS COMMUNICATION FOUNDATION 1337

CHAPTER 44: WCF DATA SERVICES 1379

CHAPTER 45: WINDOWS WORKFLOW FOUNDATION 1399

CHAPTER 46: PEER-TO-PEER NETWORKING 1425

CHAPTER 46: PEER-TO-PEER NETWORKING 1425

INDEX 1473

Full Code Download
Download
Chapter 2
Download
Chapter 3
Download
Chapter 4
Download
Chapter 5
Download
Chapter 6
Download
Chapter 7
Download
Chapter 8
Download
Chapter 9
Download
Chapter 10
Download
Chapter 11
Download
Chapter 12
Download
Chapter 13
Download
Chapter 14
Download
Chapter 15
Download
Chapter 16
Download
Chapter 18
Download
Chapter 19
Download
Chapter 20
Download
Chapter 21
Download
Chapter 22
Download
Chapter 23
Download
Chapter 25
Download
Chapter 26
Download
Chapter 27
Download
Chapter 28
Download
Chapter 29
Download
Chapter 30
Download
Chapter 31
Download
Chapter 32
Download
Chapter 33
Download
Chapter 34
Download
Chapter 35
Download
Chapter 36
Download
Chapter 37
Download
Chapter 38
Download
Chapter 39
Download
Chapter 40
Download
Chapter 41
Download
Chapter 42
Download
Chapter 43
Download
Chapter 44
Download
Chapter 45
Download
Chapter 46
Download
Chapter 47
Download
ReadMe File
Download
Error in Figures 9-1, 9-2, and 9-3, pages 213 and 218
Attached, please find updated Figures 9-1, 9-2, and 9-3, pages 213 and 218
Download
ChapterPageDetailsDatePrint Run
46Error in Text,The first text after the code currently reads:

Note that you are not permitted to declare a multipart namespace nested within another namespace.

This sentence should be removed.
03/22/2013
74Error in Text,After the heading �Auto-Implemented Properties�, after the code line:

CURRENTLY READS:
The declaration private int Age; is not needed.

SHOULD READ:
The declaration private int age; is not needed.
03/22/2013
83Error in Code,CURRENTLY READS:

 if (mathReference.IsAlive) {     math = mathReference.Target as MathTest;    math.Value = 30;     Console.WriteLine(�Value field of math variable contains � + math.Value);     Console.WriteLine(�Square of 30 is � + math.GetSquare());   } 
SHOULD READ:

 math = mathReference.Target as MathTest; if (math != null) {    math.Value = 30;     Console.WriteLine(�Value field of math variable contains � + math.Value);     Console.WriteLine(�Square of 30 is � + math.GetSquare());   } 
05/10/2013
203Error in Code,Currently reads:
 add {   newCarInfo += value; } remove {   newCarInfo = value; } 

Should be:
 add {   newCarInfo += value; } remove {   newCarInfo -= value; } 
12/28/2012
208Error in Code,Currently reads:
private delegate EventHandler newCarInfo;

Should read:
private EventHandler newCarInfo;
12/28/2012
218Error in Figure 9-2,Upper two rectangles of the Figure 9-2:

CURRENTLY READS:
{0, 10:E

SHOULD READ:
{0, 10:E}
10/9/2013
225Error in Text,2nd sentence in the paragraph after the first code block:

CURRENTLY READS:
?Note that you use another property on the Match object, Value, which contains the string identified for the match?.

SHOULD READ:
The sentence should be removed.
10/9/2013
255Error in Code,In the code block, near the end of page 255:

Currently reads:
int numLength = id.Length 1;

Should read:
int numLength = id.Length - 1;
3/26/2013
381Error in Code,Starting at 3rd line of code:

Currently:
   public LastModifiedAttribute(string dateModified, string changes)   {     dateModified = DateTime.Parse(dateModified);     _changes = changes;   } 


Should be:
   public LastModifiedAttribute(string dateModified, string changes)   {     _dateModified = DateTime.Parse(dateModified);     _changes = changes;   } 
10/03/2013
33978Error in Text,First sentence of page
Currently reads:
You access the customers and their orders with two iterations shown in the next code block?
Should read:
You access the racers and race results with two iterations shown in the next code block?
08/12/14
33978Error in Text,2nd Paragraph
Currently reads:
...in the designer-generated property Orders from the class Customer (code file�)
Should read:
�in the designer-generated property RaceResults from the class Racer (code file�)
08/12/14
587Text Correction: Error in Code,Currently reads:
int index = WaitHandle.WaitAny(mEvents);
Should read:
int index = WaitHandle.WaitAny(waitHandles);
04/02/15