C# 5.0 Programmer's Reference

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

A guide to the latest C# language standard, C# 5.0, covers such topics as object-oriented programming, Visual Studio, regular expressions, asynchronous and parallel programming, serialization, and encryption techniques.

Author(s): Rod Stephens
Publisher: John Wiley & Sons
Year: 2014

Language: English
Pages: 960

Contents
Introduction
Who Should Read This Book
Approach
Which Edition of Visual Studio Should You Use?
How This Book Is Organized
How to Use This Book
Necessary Equipment
Conventions
Source Code
Errata
p2p.wrox.com
Important URLs
Part I: The C# Ecosystem
Chapter 1: The C# Environment
Visual Studio
The C# Compiler
The CLR
The .NET Framework
Summary
Exercises
Chapter 2: Writing a First Program
Types of Projects
Console Applications
Windows Forms Applications
WPF Applications
Windows Store Applications
Summary
Exercises
Chapter 3: Program and Code File Structure
Hidden Files
Preprocessor Directives
Code File Structure
Comments
Summary
Exercises
Part II: C# Language Elements
Chapter 4: Data Types, Variables, and Constants
Data Types
Variable Declaration Syntax
Initialization
Literal Type Characters
Data Type Conversion
Scope
Parameter Declarations
Properties
Enumerations
Nullable Types
Delegates
Summary
Exercises
Chapter 5: Operators
Arithmetic Operators
Comparison Operators
Logical Operators
Bitwise Operators
Conditional and Null-coalescing Operators
Assignment Operators
Operator Precedence
The StringBuilder Class
DateTime and TimeSpan Operations
Operator Overloading
Summary
Exercises
Chapter 6: Methods
Method Declarations
Extension Methods
Lambda Expressions
Variance
Asynchronous Methods
Summary
Exercises
Chapter 7: Program Control Statements
Decision Statements
Looping Statements
Summary
Exercises
Chapter 8: LINQ
Introduction to LINQ
Basic LINQ Query Syntax
Advanced LINQ Query Syntax
Other LINQ Methods
LINQ Extension Methods
LINQ to Objects
LINQ to XML
LINQ to ADO.NET
PLINQ
Summary
Exercises
Chapter 9: Error Handling
Bugs Versus Undesirable Conditions
try catch Blocks
Summary
Exercises
Chapter 10: Tracing and Debugging
The Debug Menu
The Debug ➪ Windows Submenu
The Breakpoints Window
The Immediate Window
Trace Listeners
Summary
Exercises
Part III: Object-Oriented Programming
Chapter 11: OOP Concepts
Classes
Encapsulation
Inheritance
Polymorphism
Summary
Exercises
Chapter 12: Classes and Structures
Classes
Structures
Constructors
Structure Instantiation Details
Garbage Collection
Events
Static Methods
Summary
Exercises
Chapter 13: Namespaces
Collisions in .NET
The using Directive
The Default Namespace
Making Namespaces
Resolving Namespaces
The global Namespace
Summary
Exercises
Chapter 14: Collection Classes
Arrays
System.Collections
Dictionaries
CollectionsUtil
Stacks and Queues
Generic Collections
Collection Initializers
Iterators
Summary
Exercises
Chapter 15: Generics
Advantages of Generics
Defining Generics
Instantiating Generic Classes
Generic Collection Classes
Generic Methods
Generics and Extension Methods
Summary
Exercises
Part IV: Interacting with the Environment
Chapter 16: Printing
Windows Forms Printing
WPF Printing
Summary
Exercises
Chapter 17: Configuration and Resources
Environment Variables
Registry
Configuration Files
Resource Files
Summary
Exercises
Chapter 18: Streams
Stream
FileStream
MemoryStream
BinaryReader and BinaryWriter
TextReader and TextWriter
StringReader and StringWriter
StreamReader and StreamWriter
Exists, OpenText, CreateText, and AppendText
Custom Stream Classes
Summary
Exercises
Chapter 19: File System Objects
Filesystem Permissions
.NET Framework Classes
Using the Recycle Bin
Summary
Exercises
Chapter 20: Networking
Networking Classes
Downloading Information
Uploading Information
Getting FTP Information
Sending E‑mail
Sending Text Messages
Summary
Exercises
Part V: Advanced Topics
Chapter 21: Regular Expressions
Building Regular Expressions
Using Regular Expressions
Summary
Exercises
Chapter 22: Parallel Programming
Interacting with the User Interface
BackgroundWorker
Tasks
Threads
Coordinating Tasks
Thread-Safe Objects
Summary
Exercises
Chapter 23: ADO.NET
Selecting a Database
Using Bound Controls
Loading DataSets
Using ADO.NET
Summary
Exercises
Chapter 24: XML
Basic XML Syntax
Writing XML Data
Reading XML Data
Related Technologies
Summary
Exercises
Chapter 25: Serialization
XML Serialization
JSON Serialization
Binary Serialization
Summary
Exercises
Chapter 26: Reflection
Learning About Classes
Getting and Setting Properties
Getting Assembly Information
Invoking Methods
Running Scripts
Summary
Exercises
Chapter 27: Cryptography
Cryptographic Operations
Randomness
Symmetric Key Encryption
Asymmetric Key Encryption
Summary
Exercises
Part VI: Appendices
Appendix A: Solutions to Exercises
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Chapter 15
Chapter 16
Chapter 17
Chapter 18
Chapter 19
Chapter 20
Chapter 21
Chapter 22
Chapter 23
Chapter 24
Chapter 25
Chapter 26
Chapter 27
Appendix B: Data Types
Casting and Converting Values
Parsing Values
Appendix C: Variable Declarations
Initialization Expressions
Using
Enumerated Type Declarations
Appendix D: Constant Declarations
Appendix E: Operators
Arithmetic Operators
Comparison Operators
Logical Operators
Bitwise Operators
Assignment Operators
Conditional and Null-coalescing Operators
Operator Precedence
DateTime and TimeSpan Operators
Operator Overloading
Appendix F: Method Declarations
Methods
Property Procedures
Lambda Functions and Expressions
Extension Methods
Appendix G: Useful Attributes
Useful XML Serialization Attributes
Useful JSON Serialization Attributes
Binary Serialization Attributes
Other Useful Attributes
Appendix H: Control Statements
Decision Statements
Looping Statements
Appendix I: Error Handling
Throwing Exceptions
Appendix J: LINQ
Basic LINQ Query Syntax
LINQ Functions
LINQ to XML
LINQ to ADO.NET
PLINQ
Appendix K: Classes and Structures
Classes
Structures
Constructors
Destructors
Events
Appendix L: Collection Classes
Arrays
Collections
Iterators
Appendix M: Generic Declarations
Generic Classes
Generic Methods
Appendix N: Printing and Graphics
Windows Forms Printing
WPF Printing
Appendix O: Useful Exception Classes
Standard Exception Classes
Custom Exception Classes
Appendix P: Date and Time Format Specifiers
Standard Format Specifiers
Custom Format Specifiers
Appendix Q: Other Format Specifiers
Standard Numeric Format Specifiers
Custom Numeric Format Specifiers
Numeric Formatting Sections
Composite Formatting
Enumerated Type Formatting
Appendix R: Streams
Stream Class Summary
Stream
BinaryReader and BinaryWriter
TextReader and TextWriter
StringReader and StringWriter
StreamReader and StreamWriter
Text File Stream Methods
Appendix S: Filesystem Classes
Framework Classes
Special Folders
Recycle Bin
Appendix T: Regular Expressions
Creating Regular Expressions
Regular Expression Options
Using Regular Expressions
Appendix U: Parallel Programming
Interacting with the User Interface
PLINQ
BackgroundWorker
TPL
Tasks
Threads
Appendix V: XML
Special Characters
Writing XML Data
Reading XML Data
Related Technologies
Appendix W: Serialization
XML Serialization
JSON Serialization
Binary Serialization
Appendix X: Reflection
Type
MemberInfo
EventInfo
MethodInfo
FieldInfo
PropertyInfo
ParameterInfo
Index
Uploaded by [StormRG]