Librería Portfolio Librería Portfolio

Búsqueda avanzada

TIENE EN SU CESTA DE LA COMPRA

0 productos

en total 0,00 €

BEGINNING C# 6.0 PROGRAMMING WITH VISUAL STUDIO 2015
Título:
BEGINNING C# 6.0 PROGRAMMING WITH VISUAL STUDIO 2015
Subtítulo:
Autor:
PERKINS, B
Editorial:
JOHN WILEY
Año de edición:
2016
Materia
C# Y .NET
ISBN:
978-1-119-09668-9
Páginas:
840
49,50 €

 

Sinopsis

Get started with Visual C# programming with this great beginner´s guide
Beginning C# 6.0 Programming with Visual Studio 2015 provides step-by-step directions for programming with C# in the .NET framework. Beginning with programming essentials, such as variables, flow control, and object-oriented programming, this authoritative text moves into more complicated topics, such as web and Windows programming and data access within both database and XML environments. After your introduction to each of the chapters, you are invited to apply your newfound knowledge in Try it Out sections, which reinforce learning and help you understand the practical applications of the new concepts you have explored. Through this approach, you can write useful programming code following each of the steps that you explore in this essential text.

Discover the basics of programming with C#, such as variables, expressions, flow control, and functions
Discuss how to keep your program running smoothly through debugging and error handling
Understand how to navigate your way through key programming elements, such as classes, class members, collections, comparisons, and conversions
Explore object-oriented programming, web programming, and Windows programming
Beginning C# 6.0 Programming with Visual Studio 2015 is a fundamental resource for any programmers who are new to the C# language.



Table of Contents

INTRODUCTION xix
PART I: THE OOP LANGUAGE

CHAPTER 1: INTRODUCING C# 3

What Is the .NET Framework? 4

What's in the .NET Framework? 4

Writing Applications Using the .NET Framework 5

What Is C#? 8

Applications You Can Write with C# 9

C# in this Book 10

Visual Studio 2015 10

Visual Studio Express 2015 Products 10

Solutions 11

CHAPTER 2: WRITING A C# PROGRAM 13

The Visual Studio 2015 Development Environment 14

Console Applications 17

The Solution Explorer 20

The Properties Window 21

The Error List Window 22

Desktop Applications 22

CHAPTER 3: VARIABLES AND EXPRESSIONS 29

Basic C# Syntax 30

Basic C# Console Application Structure 33

Variables 34

Simple Types 34

Variable Naming 39

Literal Values 39

Expressions 42

Mathematical Operators 42

Assignment Operators 47

Operator Precedence 48

Namespaces 49

CHAPTER 4: FLOW CONTROL 53

Boolean Logic 54

Boolean Bitwise and Assignment Operators 56

Operator Precedence Updated 58

Branching 59

The Ternary Operator 59

The if Statement 59

The switch Statement 63

Looping 66

do Loops 66

while Loops 69

for Loops 71

Interrupting Loops 72

Infinite Loops 73

CHAPTER 5: MORE ABOUT VARIABLES 77

Type Conversion 78

Implicit Conversions 78

Explicit Conversions 80

Explicit Conversions Using the Convert Commands 83

Complex Variable Types 85

Enumerations 85

Structs 89

Arrays 92

String Manipulation 99

CHAPTER 6: FUNCTIONS 107

Defining and Using Functions 108

Return Values 110

Parameters 112

Variable Scope 119

Variable Scope in Other Structures 122

Parameters and Return Values versus Global Data 123

The Main() Function 125

Struct Functions 127

Overloading Functions 128

Using Delegates 130

CHAPTER 7: DEBUGGING AND ERROR HANDLING 135

Debugging in Visual Studio 136

Debugging in Nonbreak (Normal) Mode 136

Debugging in Break Mode 144

Error Handling 153

try.catch.finally 153

Listing and Configuring Exceptions 160

CHAPTER 8: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING 163

What Is Object-Oriented Programming? 164

What Is an Object? 165

Everything's an Object 168

The Life Cycle of an Object 168

Static and Instance Class Members 169

OOP Techniques 170

Interfaces 171

Inheritance 172

Polymorphism 175

Relationships between Objects 177

Operator Overloading 179

Events 180

Reference Types versus Value Types 180

OOP in Desktop Applications 180

CHAPTER 9: DEFINING CLASSES 187

Class Definitions in C# 188

Interface Definitions 190

System.Object 193

Constructors and Destructors 195

Constructor Execution Sequence 196

OOP Tools in Visual Studio 200

The Class View Window 200

The Object Browser 202

Adding Classes 203

Class Diagrams 204

Class Library Projects 206

Interfaces versus Abstract Classes 209

Struct Types 212

Shallow Copying versus Deep Copying 214

CHAPTER 10: DEFINING CLASS MEMBERS 217

Member Definitions 218

Defining Fields 218

Defining Methods 219

Defining Properties 220

Refactoring Members 225

Automatic Properties 226

Additional Class Member Topics 227

Hiding Base Class Methods 227

Calling Overridden or Hidden Base Class Methods 229

Using Nested Type Defi nitions 230

Interface Implementation 232

Implementing Interfaces in Classes 233

Partial Class Definitions 235

Partial Method Definitions 237

Example Application 238

Planning the Application 238

Writing the Class Library 239

A Client Application for the Class Library 246

The Call Hierarchy Window 248

CHAPTER 11: COLLECTIONS, COMPARISONS, AND CONVERSIONS 251

Collections 252

Using Collections 253

Defining Collections 258

Indexers 259

Adding a Cards Collection to CardLib 262

Keyed Collections and IDictionary 264

Iterators 266

Iterators and Collections 270

Deep Copying 271

Adding Deep Copying to CardLib 273

Comparisons 275

Type Comparisons 275

Value Comparisons 279

Conversions 295

Overloading Conversion Operators 295

The as Operator 297

CHAPTER 12: GENERICS 301

What Are Generics? 302

Using Generics 303

Nullable Types 303

The System.Collections.Generic Namespace 311

Defining Generic Types 321

Defining Generic Classes 322

Defining Generic Interfaces 332

Defining Generic Methods 333

Defining Generic Delegates 334

Variance 335

Covariance 336

Contravariance 336

CHAPTER 13: ADDITIONAL C# TECHNIQUES 341

The : : Operator and the Global Namespace Qualifi er 342

Custom Exceptions 343

Adding Custom Exceptions to CardLib 343

Events 345

What Is an Event? 345

Handling Events 347

Defining Events 350

Expanding and Using CardLib 357

Attributes 365

Reading Attributes 366

Creating Attributes 367

Initializers 368

Object Initializers 368

Collection Initializers 371

Type Inference 374

Anonymous Types 376

Dynamic Lookup 380

The dynamic Type 381

Advanced Method Parameters 384

Optional Parameters 385

Named Parameters 386

Lambda Expressions 391

Anonymous Methods Recap 391

Lambda Expressions for Anonymous Methods 392

Lambda Expression Parameters 396

Lambda Expression Statement Bodies 396

Lambda Expressions as Delegates and Expression Trees 398

Lambda Expressions and Collections 399

PART II: WINDOWS PROGRAMMING

CHAPTER 14: BASIC DESKTOP PROGRAMMING 407

XAML 408

Separation of Concerns 409

XAML in Action 409

The Playground 41