Sharpen your knowledge of C#

C# know-how is a must if you want to be a professional Microsoft developer. It's also good to know a little C# if you're building tools for the web, mobile apps, or other development tasks. C# 7.0 All-in-One For Dummies offers a deep dive into C# for coders still learning the nuances of the valuable programming language. Pop it open to get an intro into coding with C#, how to design secure apps and databases, and even pointers on building web and mobile apps with C#.

C# remains one of the most in-demand programming language skills. The language regularly ranks in the top five among "most in-demand" languages, typically along with Java/JavaScript, C++, and Python. A December 2016 ZDNet article noted 'If your employer is a Microsoft developer, you better know C#." Lucky for you, this approachable, all-in-one guide is here to help you do just that--without ever breaking a sweat!

Includes coverage of the latest changes to C#

* Shows you exactly what the language can (and can't) do

* Presents familiar tasks that you can accomplish with C#

* Provides insight into developing applications that provide protection against hackers

If you have a basic understanding of coding and need to learn C#--or need a reference on the language in order to launch or further your career--look no further.



Autorentext

John Paul Mueller is a writer on programming topics like AWS, Python, Java, HTML, CSS, and JavaScript. William Sempf is a programmer and .NET evangelist. Chuck Sphar was a full-time senior technical writer for the Visual C++ product group at Microsoft.

Zusammenfassung
Sharpen your knowledge of C#

C# know-how is a must if you want to be a professional Microsoft developer. It's also good to know a little C# if you're building tools for the web, mobile apps, or other development tasks. C# 7.0 All-in-One For Dummies offers a deep dive into C# for coders still learning the nuances of the valuable programming language. Pop it open to get an intro into coding with C#, how to design secure apps and databases, and even pointers on building web and mobile apps with C#.

C# remains one of the most in-demand programming language skills. The language regularly ranks in the top five among "most in-demand" languages, typically along with Java/JavaScript, C++, and Python. A December 2016 ZDNet article noted 'If your employer is a Microsoft developer, you better know C#." Lucky for you, this approachable, all-in-one guide is here to help you do just thatwithout ever breaking a sweat!

Includes coverage of the latest changes to C#

  • Shows you exactly what the language can (and can't) do
  • Presents familiar tasks that you can accomplish with C#
  • Provides insight into developing applications that provide protection against hackers

If you have a basic understanding of coding and need to learn C#or need a reference on the language in order to launch or further your careerlook no further.



Inhalt

Introduction 1

About This Book 1

Foolish Assumptions 2

Icons Used in This Book 2

Beyond the Book 3

Where to Go from Here 4

Book 1: The Basics of C# Programming 5

Chapter 1: Creating Your First C# Console Application 7

Getting a Handle on Computer Languages, C#, and .NET 7

Creating Your First Console Application 11

Making Your Console App Do Something 17

Reviewing Your Console Application 18

Introducing the Toolbox Trick 21

Chapter 2: Living with Variability Declaring Value-Type Variables 23

Declaring a Variable 24

What's an int? 25

Representing Fractions 27

Handling Floating-Point Variables 28

Using the Decimal Type: Is it an Integer or a Float? 31

Examining the bool Type: Is it Logical? 33

Checking Out Character Types 33

What's a Value Type? 36

Comparing string and char 37

Calculating Leap Years: DateTime 38

Declaring Numeric Constants 40

Changing Types: The Cast 41

Letting the C# Compiler Infer Data Types 42

Chapter 3: Pulling Strings 45

The Union is Indivisible, and So are Strings 46

Performing Common Operations on a String 48

Comparing Strings 48

What If I Want to Switch Case? 53

Looping through a String 54

Searching Strings 55

Getting Input from the Command Line 57

Controlling Output Manually 62

Formatting Your Strings Precisely 68

StringBuilder: Manipulating Strings More Efficiently 73

Chapter 4: Smooth Operators 75

Performing Arithmetic 75

Performing Logical Comparisons Is That Logical? 79

Matching Expression Types at TrackDownAMate.com 83

Chapter 5: Getting into the Program Flow 89

Branching Out with if and switch 90

Here We Go Loop-the-Loop 101

Looping a Specified Number of Times with for 112

Nesting Loops 115

Don't goto Pieces 116

Chapter 6: Lining Up Your Ducks with Collections 119

The C# Array 120

Processing Arrays by Using foreach 126

Sorting Arrays of Data 128

Using var for Arrays 132

Loosening Up with C# Collections 133

Understanding Collection Syntax 134

Using Lists 136

Using Dictionaries 139

Array and Collection Initializers 141

Using Sets 142

On Not Using Old-Fashioned Collections 147

Chapter 7: Stepping through Collections 149

Iterating through a Directory of Files 149

Iterating foreach Collections: Iterators 157

Accessing Collections the Array Way: Indexers 160

Looping Around the Iterator Block 165

Chapter 8: Buying Generic 177

Writing a New Prescription: Generics 178

Classy Generics: Writing Your Own 179

Revising Generics 197

Chapter 9: Some Exceptional Exceptions 201

Using an Exceptional Error-Reporting Mechanism 202

Throwing Exceptions Yourself 207

Knowing What Exceptions are for 207

Can I Get an Exceptional Example? 208

Assigning Multiple catch Blocks 211

Planning Your Exception-Handling Strategy 214

Grabbing Your Last Chance to Catch an Exception 219

Throwing Expressions 220

Chapter 10: Creating Lists of Items with Enumerations 223

Seeing Enumerations in the Real World 224

Working with Enumerations 225

Creating Enumerated Flags 228

Defining Enumerated Switches 230

...

Titel
C# 7.0 All-in-One For Dummies
EAN
9781119428107
Format
E-Book (epub)
Hersteller
Veröffentlichung
07.12.2017
Digitaler Kopierschutz
Adobe-DRM
Dateigrösse
7.77 MB
Anzahl Seiten
864