C# 7.0 All-in-One For Dummies

C# 7.0 All-in-One For Dummies

Now pay Easier and Secure using Paypal

Read more

by John Paul Mueller, Bill Sempf, and Chuck Sphar

6 Books in One

Book 1: The Basics of C# Programming
Book 2: Object-Oriented C# Programming
Book 3: Designing for C#
Book 4: A Tour of Visual Studio
Book 5: Windows Development with WPF
Book 6: Web Development with ASP.NET

e-books shop
e-books shop
Purchase Now !
Just with Paypal

Book Details
 5.00 USD
 827 p
 File Size
 9,900 KB
 File Type
 PDF format

 978-111-9-42810-7 (ebk)
 978-111-9-42812-1 (ebk)
 2018 by John Wiley & Sons, Inc 

About the Author
John Mueller is a freelance author and technical editor. He has writing in his
blood, having produced 104 books and more than 600 articles to date. The
topics range from networking to artificial intelligence and from database
management to heads-down programming. Some of his current works include
a book about machine learning, a couple of Python books, and a book about
MATLAB. He has also written AWS For Admins For Dummies, which
provides administrators with a great place to start with AWS, and AWS For
Developers For Dummies, the counterpart for developers. His technical
editing skills have helped more than 70 authors refine the content of their
manuscripts. John has always been interested in development and has written
about a wide variety of languages, including a highly successful C++ book.

Be sure to read John’s blog at http://blog.johnmuellerbooks.com/. You
can reach John on the Internet at John@JohnMuellerBooks.com.

C# is an amazing language! You can use this single language to do
everything from desktop development to creating web applications and even
web-based application programming interfaces (APIs). While other
developers have to overcome deficiencies in their languages to create even a
subset of the application types that C# supports with aplomb, you can be
coding your application, testing, and then sitting on the beach enjoying the
fruits of your efforts. Of course, any language that does this much requires a
bit of explanation, and C# 7.0 All-in-One For Dummies is your doorway to
this new adventure in development.

So, why do you need C# 7.0 All-in-One For Dummies specifically? This book
stresses learning the basics of the C# language before you do anything else.
With this in mind, the book begins with all the C# basics in Books 1 through
3, helps you get Visual Studio 2017 installed in Book 4, and then takes you
through more advanced development tasks, including basic web
development, in Books 5 through 6. Using this book helps you get the most
you can from C# 7.0 in the least possible time.

About This Book
Even if you have past experience with C#, the new features in C# 7.0 will
have you producing feature-rich applications in an even shorter time than you
may have before. C# 7.0 All-in-One For Dummies introduces you to all these
new features. For example, you discover the new pattern-matching techniques
that C# 7.0 provides. You also discover the wonders of using tuples and local
functions. Even the use of literals has improved, but you’ll have to look
inside to find out how. This particular book is designed to make using C# 7.0
fast and easy; it removes the complexity that you may have experienced when
trying to learn about these topics online.

To help you absorb the concepts, this book uses the following conventions:
Text that you’re meant to type just as it appears in the book is in bold.
The exception is when you’re working through a step list: Because each
step is bold, the text to type is not bold.

Words for you to type that are also in italics are meant as placeholders;
you need to replace them with something that works for you. For
example, if you see “Type Your Name and press Enter,” you need to
replace Your Name with your actual name.
I also use italics for terms I define. This means that you don’t have to rely
on other sources to provide the definitions you need.
Web addresses and programming code appear in monofont. If you’re
reading a digital version of this book on a device connected to the
Internet, you can click the live link to visit a website, like this:
When you need to click command sequences, you see them separated by a
special arrow, like this: File ⇒ New File, which tells you to click File and
then click New File.

Table of Contents
About This Book
Foolish Assumptions
Icons Used in This Book
Beyond the Book
Where to Go from Here
Book 1: The Basics of C# Programming
Chapter 1: Creating Your First C# Console
Getting a Handle on Computer Languages, C#, and .NET
Creating Your First Console Application
Making Your Console App Do Something
Reviewing Your Console Application
Introducing the Toolbox Trick
Chapter 2: Living with Variability — Declaring
Value-Type Variables
Declaring a Variable
What’s an int?
Representing Fractions
Handling Floating-Point Variables
Using the Decimal Type: Is It an Integer or a Float?
Examining the bool Type: Is It Logical?
Checking Out Character Types
What’s a Value Type?
Comparing string and char
Calculating Leap Years: DateTime
Declaring Numeric Constants
Changing Types: The Cast
Letting the C# Compiler Infer Data Types
Chapter 3: Pulling Strings
The Union Is Indivisible, and So Are Strings
Performing Common Operations on a String
Comparing Strings
What If I Want to Switch Case?
Looping through a String
Searching Strings
Getting Input from the Command Line
Controlling Output Manually
Formatting Your Strings Precisely
StringBuilder: Manipulating Strings More Efficiently
Chapter 4: Smooth Operators
Performing Arithmetic
Performing Logical Comparisons — Is That Logical?
Matching Expression Types at TrackDownAMate.com
Chapter 5: Getting into the Program Flow
Branching Out with if and switch
Here We Go Loop-the-Loop
Looping a Specified Number of Times with for
Nesting Loops
Don’t goto Pieces
Chapter 6: Lining Up Your Ducks with Collections
The C# Array
Processing Arrays by Using foreach
Sorting Arrays of Data
Using var for Arrays
Loosening Up with C# Collections
Understanding Collection Syntax
Using Lists
Using Dictionaries
Array and Collection Initializers
Using Sets
On Not Using Old-Fashioned Collections
Chapter 7: Stepping through Collections
Iterating through a Directory of Files
Iterating foreach Collections: Iterators
Accessing Collections the Array Way: Indexers
Looping Around the Iterator Block
Chapter 8: Buying Generic
Writing a New Prescription: Generics
Classy Generics: Writing Your Own
Revising Generics
Chapter 9: Some Exceptional Exceptions
Using an Exceptional Error-Reporting Mechanism
Throwing Exceptions Yourself
Knowing What Exceptions Are For
Can I Get an Exceptional Example?
Assigning Multiple catch Blocks
Planning Your Exception-Handling Strategy
Grabbing Your Last Chance to Catch an Exception
Throwing Expressions
Chapter 10: Creating Lists of Items with
Seeing Enumerations in the Real World
Working with Enumerations
Creating Enumerated Flags
Defining Enumerated Switches
Book 2: Object-Oriented C# Programming
Chapter 1: Object-Oriented Programming —
What’s It All About?
Object-Oriented Concept #1: Abstraction
Object-Oriented Concept #2: Classification
Why Classify?
Object-Oriented Concept #3: Usable Interfaces
Object-Oriented Concept #4: Access Control
How C# Supports Object-Oriented Concepts
Chapter 2: Showing Some Class
Defining a Class and an Object
Accessing the Members of an Object
An Object-Based Program Example
Discriminating between Objects
Can You Give Me References?
Classes That Contain Classes Are the Happiest Classes in the
Generating Static in Class Members
Defining const and readonly Data Members
Chapter 3: We Have Our Methods
Defining and Using a Method
A Method Example for Your Files
Having Arguments with Methods
Returning Values after Christmas
Returning Multiple Values Using Tuples
Chapter 4: Let Me Say This about this
Passing an Object to a Method
Defining Methods
Accessing the Current Object
Using Local Functions
Chapter 5: Holding a Class Responsible
Restricting Access to Class Members
Why You Should Worry about Access Control
Defining Class Properties
Getting Your Objects Off to a Good Start — Constructors
The C#-Provided Constructor
Replacing the Default Constructor
Using Expression-Bodied Members
Chapter 6: Inheritance: Is That All I Get?
Class Inheritance
Why You Need Inheritance
Inheriting from a BankAccount Class (a More Complex Example)
IS_A versus HAS_A — I’m So Confused_A
When to IS_A and When to HAS_A
Other Features That Support Inheritance
The object Class
Inheritance and the Constructor
The Updated BankAccount Class
Chapter 7: Poly-what-ism?
Overloading an Inherited Method
The Class Business Card: ToString()
C# During Its Abstract Period
Sealing a Class
Chapter 8: Interfacing with the Interface
Introducing CAN_BE_USED_AS
Knowing What an Interface Is
Using an Interface
Using the C# Predefined Interface Types
Looking at a Program That CAN_BE_USED_AS an Example
Unifying Class Hierarchies
Hiding Behind an Interface
Inheriting an Interface
Using Interfaces to Manage Change in Object-Oriented
Chapter 9: Delegating Those Important Events
E.T., Phone Home — The Callback Problem
Defining a Delegate
Pass Me the Code, Please — Examples
A More Real-World Example
Shh! Keep It Quiet — Anonymous Methods
Stuff Happens — C# Events
Chapter 10: Can I Use Your Namespace in the
Dividing a Single Program into Multiple Source Files
Dividing a Single Program into Multiple Assemblies
Putting Your Classes into Class Libraries
Going Beyond Public and Private: More Access Keywords
Putting Classes into Namespaces
Chapter 11: Improving Productivity with Named
and Optional Parameters
Exploring Optional Parameters
Looking at Named Parameters
Dealing with Overload Resolution
Using Alternative Methods to Return Values
Chapter 12: Interacting with Structures
Comparing Structures to Classes
Creating Structures
Using Structures as Records
Book 3: Designing for C#
Chapter 1: Writing Secure Code
Designing Secure Software
Building Secure Windows Applications
Building Secure Web Forms Applications
Using System.Security
Chapter 2: Accessing Data
Getting to Know System.Data
How the Data Classes Fit into the Framework
Getting to Your Data
Using the System.Data Namespace
Chapter 3: Fishing the File Stream
Going Where the Fish Are: The File Stream
StreamWriting for Old Walter
Pulling Them Out of the Stream: Using StreamReader
More Readers and Writers
Exploring More Streams than Lewis and Clark
Chapter 4: Accessing the Internet
Getting to Know System.Net
How Net Classes Fit into the Framework
Using the System.Net Namespace
Chapter 5: Creating Images
Getting to Know System.Drawing
How the Drawing Classes Fit into the Framework
Using the System.Drawing Namespace
Chapter 6: Programming Dynamically!
Shifting C# Toward Dynamic Typing
Employing Dynamic Programming Techniques
Putting Dynamic to Use
Running with the Dynamic Language Runtime
Book 4: A Tour of Visual Studio
Chapter 1: Getting Started with Visual Studio
Versioning the Versions
Installing Visual Studio
Breaking Down the Projects
Chapter 2: Using the Interface
Designing in the Designer
Paneling the Studio
Coding in the Code Editor
Using the Tools of the Trade
Using the Debugger as an Aid to Learning
Chapter 3: Customizing Visual Studio
Setting Options
Using Snippets
Hacking the Project Types
Book 5: Windows Development with WPF
Chapter 1: Introducing WPF
Understanding What WPF Can Do
Introducing XAML
Diving In! Creating Your First WPF Application
Whatever XAML Can Do, C# Can Do Better!
Chapter 2: Understanding the Basics of WPF
Using WPF to Lay Out Your Application
Arranging Elements with Layout Panels
Exploring Common XAML Controls
Chapter 3: Data Binding in WPF
Getting to Know Dependency Properties
Exploring the Binding Modes
Investigating the Binding Object
Editing, Validating, Converting, and Visualizing Your Data
Finding Out More about WPF Data Binding
Chapter 4: Practical WPF
Commanding Attention
Using Built-In Commands
Using Custom Commands
Using Routed Commands
Book 6: Web Development with ASP.NET
Chapter 1: Looking at How ASP.NET Works with C#
Breaking Down Web Applications
Questioning the Client
Dealing with Web Servers
Chapter 2: Building Web Applications
Working in Visual Studio
Developing with Style
Chapter 3: Controlling Your Development
Showing Stuff to the User
Getting Some Input from the User
Data Binding
Styling Your Controls
Making Sure the Site Is Accessible
Constructing User Controls
Chapter 4: Leveraging the .NET Framework
Surfing Web Streams
Securing ASP.NET
Managing Files
Baking Cookies
Tracing with TraceContext
Navigating with Site Maps
About the Author
Advertisement Page
Connect with Dummies
End User License Agreement

e-books shop

Publisher’s Acknowledgments
Executive Editor: Steve Hayes
Project Manager and Copy Editor: Susan Christophersen
Technical Editor: Russ Mullen
Sr. Editorial Assistant: Cherie Case
Production Editor: Antony Sami
Cover Image: © whiteMocca/Shutterstock