Mark Michaelis
Essential C# 7.0
Mark Michaelis
Essential C# 7.0
- Broschiertes Buch
- Merkliste
- Auf die Merkliste
- Bewerten Bewerten
- Teilen
- Produkt teilen
- Produkterinnerung
- Produkterinnerung
This book provides comprehensive coverage of the C# language, going beyond a tutorial and offering a foundation upon which you can begin effective software development projects. For readers already familiar with C#, this book provides insight into some of the more complex programming paradigms and provides in-depth coverage of the features introduced in the latest version of the language, C# 7.0 and .NET Framework X.Y and .NET Core 1.X. It is both a tutorial and a reference that can be used for many years. What it is not: This is a comprehensive book about C# the language. It is NOT a book…mehr
Andere Kunden interessierten sich auch für
- Joseph AlbahariC# 12 Pocket Reference19,99 €
- Andrew StellmanHead First C# (Sharp)63,99 €
- R B WhitakerThe C# Player's Guide (4th Edition)38,99 €
- Ian GriffithsProgramming C# 12.057,99 €
- Dino EspositoProgramming ASP.NET Core54,99 €
- Mike McGrathC# Programming in Easy Steps15,99 €
- Jon SkeetC# in Depth46,99 €
-
-
-
This book provides comprehensive coverage of the C# language, going beyond a tutorial and offering a foundation upon which you can begin effective software development projects. For readers already familiar with C#, this book provides insight into some of the more complex programming paradigms and provides in-depth coverage of the features introduced in the latest version of the language, C# 7.0 and .NET Framework X.Y and .NET Core 1.X. It is both a tutorial and a reference that can be used for many years. What it is not: This is a comprehensive book about C# the language. It is NOT a book about .NET or about any specific frameworks that use C#. It's a book about the C# language itself. It also clearly points out what C# features are in/from the different versions of C#.
Hinweis: Dieser Artikel kann nur an eine deutsche Lieferadresse ausgeliefert werden.
Hinweis: Dieser Artikel kann nur an eine deutsche Lieferadresse ausgeliefert werden.
Produktdetails
- Produktdetails
- Addison-Wesley Microsoft Technology Series
- Verlag: Microsoft Press, U.S.
- 6 ed
- Seitenzahl: 1040
- Erscheinungstermin: 4. Juni 2018
- Englisch
- Abmessung: 231mm x 177mm x 58mm
- Gewicht: 1644g
- ISBN-13: 9781509303588
- ISBN-10: 1509303588
- Artikelnr.: 47369119
- Herstellerkennzeichnung
- Microsoft Press
- Edinburgh Gate
- CM20 2JE Harlow, GB
- Addison-Wesley Microsoft Technology Series
- Verlag: Microsoft Press, U.S.
- 6 ed
- Seitenzahl: 1040
- Erscheinungstermin: 4. Juni 2018
- Englisch
- Abmessung: 231mm x 177mm x 58mm
- Gewicht: 1644g
- ISBN-13: 9781509303588
- ISBN-10: 1509303588
- Artikelnr.: 47369119
- Herstellerkennzeichnung
- Microsoft Press
- Edinburgh Gate
- CM20 2JE Harlow, GB
Mark Michaelis is the founder of IntelliTect, a high-end software engineering and consulting company where he serves as the chief technical architect and trainer. Mark speaks at developer conferences and has written numerous articles and books—currently, he is the Essential .NET columnist for MSDN Magazine. Since 1996, Mark has been a Microsoft MVP for C#, Visual Studio Team System, and the Windows SDK. In 2007 he was recognized as a Microsoft Regional Director. He also serves on several Microsoft software design review teams, including C# and VSTS. Mark holds a bachelor of arts in philosophy from the University of Illinois and a masters in computer science from the Illinois Institute of Technology.
Figures xv
Tables xvii
Foreword xix
Preface xxi
Acknowledgments xxxiii
About the Author xxxv
Chapter 1: Introducing C# 1
Hello, World 2
C# Syntax Fundamentals 11
Working with Variables 20
Console Input and Output 24
Managed Execution and the Common Language Infrastructure 32
Multiple .NET Frameworks 37
Chapter 2: Data Types 43
Fundamental Numeric Types 44
More Fundamental Types 53
null and void 67
Conversions between Data Types 69
Chapter 3: More with Data Types 77
Categories of Types 77
Nullable Modifier 80
Tuples 83
Arrays 90
Chapter 4: Operators and Control Flow 109
Operators 110
Introducing Flow Control 126
Code Blocks ({}) 132
Code Blocks, Scopes, and Declaration Spaces 135
Boolean Expressions 137
Bitwise Operators (, , &, ^, ~) 147
Control Flow Statements, Continued 153
Jump Statements 165
C# Preprocessor Directives 171
Chapter 5: Methods and Parameters 181
Calling a Method 182
Declaring a Method 189
The using Directive 195
Returns and Parameters on Main() 200
Advanced Method Parameters 203
Recursion 215
Method Overloading 217
Optional Parameters 220
Basic Error Handling with Exceptions 225
Chapter 6: Classes 241
Declaring and Instantiating a Class 245
Instance Fields 249
Instance Methods 251
Using the this Keyword 252
Access Modifiers 259
Properties 261
Constructors 278
Static Members 289
Extension Methods 299
Encapsulating the Data 301
Nested Classes 304
Partial Classes 307
Chapter 7: Inheritance 313
Derivation 314
Overriding the Base Class 326
Abstract Classes 338
All Classes Derive from System.Object 344
Verifying the Underlying Type with the is Operator 345
Pattern Matching with the is Operator 346
Pattern Matching within a switch Statement 347
Conversion Using the as Operator 349
Chapter 8: Interfaces 353
Introducing Interfaces 354
Polymorphism through Interfaces 355
Interface Implementation 360
Converting between the Implementing Class and Its Interfaces 366
Interface Inheritance 366
Multiple Interface Inheritance 369
Extension Methods on Interfaces 369
Implementing Multiple Inheritance via Interfaces 371
Versioning 374
Interfaces Compared with Classes 375
Interfaces Compared with Attributes 377
Chapter 9: Value Types 379
Structs 383
Boxing 390
Enums 398
Chapter 10: Well-Formed Types 411
Overriding object Members 411
Operator Overloading 424
Referencing Other Assemblies 432
Defining Namespaces 442
XML Comments 445
Garbage Collection 449
Resource Cleanup 452
Lazy Initialization 461
Chapter 11: Exception Handling 465
Multiple Exception Types 465
Catching Exceptions 469
General Catch Block 473
Guidelines for Exception Handling 475
Defining Custom Exceptions 479
Rethrowing a Wrapped Exception 483
Chapter 12: Generics 487
C# without Generics 488
Introducing Generic Types 493
Constraints 506
Generic Methods 519
Covariance and Contravariance 524
Generic Internals 531
Chapter 13: Delegates and Lambda Expressions 537
Introducing Delegates 538
Declaring Delegate Types 542
Lambda Expressions 550
Anonymous Methods 556
Chapter 14: Events 575
Coding the Publish-Subscribe Pattern with Multicast Delegates 576
Understanding Events 591
Chapter 15: Collection Interfaces with Standard Query Operators 603
Collection Initializers 604
What Makes a Class a Collection: IEnumerable 607
Standard Query Operators 613
Anonymous Types with LINQ 646
Chapter 16: LINQ with Query Expressions 657
Introducing Query Expressions 658
Query Expressions Are Just Method Invocations 676
Chapter 17: Building Custom Collections 679
More Collection Interfaces 680
Primary Collection Classes 683
Providing an Indexer 702
Returning Null or an Empty Collection 705
Iterators 705
Chapter 18: Reflection, Attributes, and Dynamic Programming 721
Reflection 722
nameof Operator 733
Attributes 735
Programming with Dynamic Objects 759
Chapter 19: Multithreading 771
Multithreading Basics 774
Working with System.Threading 781
Asynchronous Tasks 789
Canceling a Task 810
The Task-based Asynchronous Pattern 816
Executing Loop Iterations in Parallel 846
Running LINQ Queries in Parallel 856
Chapter 20: Thread Synchronization 863
Why Synchronization? 864
Timers 893
Chapter 21: Platform Interoperability and Unsafe Code 897
Platform Invoke 898
Pointers and Addresses 910
Executing Unsafe Code via a Delegate 920
Chapter 22: The Common Language Infrastructure 923
Defining the Common Language Infrastructure 924
CLI Implementations 925
.NET Standard 928
Base Class Library 929
C# Compilation to Machine Code 929
Runtime 932
Assemblies, Manifests, and Modules 936
Common Intermediate Language 939
Common Type System 939
Common Language Specification 940
Metadata 941
.NET Native and Ahead of Time Compilation 942
Index 945
Index of 7.0 Topics 995
Index of 6.0 Topics 998
Index of 5.0 Topics 1001
Tables xvii
Foreword xix
Preface xxi
Acknowledgments xxxiii
About the Author xxxv
Chapter 1: Introducing C# 1
Hello, World 2
C# Syntax Fundamentals 11
Working with Variables 20
Console Input and Output 24
Managed Execution and the Common Language Infrastructure 32
Multiple .NET Frameworks 37
Chapter 2: Data Types 43
Fundamental Numeric Types 44
More Fundamental Types 53
null and void 67
Conversions between Data Types 69
Chapter 3: More with Data Types 77
Categories of Types 77
Nullable Modifier 80
Tuples 83
Arrays 90
Chapter 4: Operators and Control Flow 109
Operators 110
Introducing Flow Control 126
Code Blocks ({}) 132
Code Blocks, Scopes, and Declaration Spaces 135
Boolean Expressions 137
Bitwise Operators (, , &, ^, ~) 147
Control Flow Statements, Continued 153
Jump Statements 165
C# Preprocessor Directives 171
Chapter 5: Methods and Parameters 181
Calling a Method 182
Declaring a Method 189
The using Directive 195
Returns and Parameters on Main() 200
Advanced Method Parameters 203
Recursion 215
Method Overloading 217
Optional Parameters 220
Basic Error Handling with Exceptions 225
Chapter 6: Classes 241
Declaring and Instantiating a Class 245
Instance Fields 249
Instance Methods 251
Using the this Keyword 252
Access Modifiers 259
Properties 261
Constructors 278
Static Members 289
Extension Methods 299
Encapsulating the Data 301
Nested Classes 304
Partial Classes 307
Chapter 7: Inheritance 313
Derivation 314
Overriding the Base Class 326
Abstract Classes 338
All Classes Derive from System.Object 344
Verifying the Underlying Type with the is Operator 345
Pattern Matching with the is Operator 346
Pattern Matching within a switch Statement 347
Conversion Using the as Operator 349
Chapter 8: Interfaces 353
Introducing Interfaces 354
Polymorphism through Interfaces 355
Interface Implementation 360
Converting between the Implementing Class and Its Interfaces 366
Interface Inheritance 366
Multiple Interface Inheritance 369
Extension Methods on Interfaces 369
Implementing Multiple Inheritance via Interfaces 371
Versioning 374
Interfaces Compared with Classes 375
Interfaces Compared with Attributes 377
Chapter 9: Value Types 379
Structs 383
Boxing 390
Enums 398
Chapter 10: Well-Formed Types 411
Overriding object Members 411
Operator Overloading 424
Referencing Other Assemblies 432
Defining Namespaces 442
XML Comments 445
Garbage Collection 449
Resource Cleanup 452
Lazy Initialization 461
Chapter 11: Exception Handling 465
Multiple Exception Types 465
Catching Exceptions 469
General Catch Block 473
Guidelines for Exception Handling 475
Defining Custom Exceptions 479
Rethrowing a Wrapped Exception 483
Chapter 12: Generics 487
C# without Generics 488
Introducing Generic Types 493
Constraints 506
Generic Methods 519
Covariance and Contravariance 524
Generic Internals 531
Chapter 13: Delegates and Lambda Expressions 537
Introducing Delegates 538
Declaring Delegate Types 542
Lambda Expressions 550
Anonymous Methods 556
Chapter 14: Events 575
Coding the Publish-Subscribe Pattern with Multicast Delegates 576
Understanding Events 591
Chapter 15: Collection Interfaces with Standard Query Operators 603
Collection Initializers 604
What Makes a Class a Collection: IEnumerable 607
Standard Query Operators 613
Anonymous Types with LINQ 646
Chapter 16: LINQ with Query Expressions 657
Introducing Query Expressions 658
Query Expressions Are Just Method Invocations 676
Chapter 17: Building Custom Collections 679
More Collection Interfaces 680
Primary Collection Classes 683
Providing an Indexer 702
Returning Null or an Empty Collection 705
Iterators 705
Chapter 18: Reflection, Attributes, and Dynamic Programming 721
Reflection 722
nameof Operator 733
Attributes 735
Programming with Dynamic Objects 759
Chapter 19: Multithreading 771
Multithreading Basics 774
Working with System.Threading 781
Asynchronous Tasks 789
Canceling a Task 810
The Task-based Asynchronous Pattern 816
Executing Loop Iterations in Parallel 846
Running LINQ Queries in Parallel 856
Chapter 20: Thread Synchronization 863
Why Synchronization? 864
Timers 893
Chapter 21: Platform Interoperability and Unsafe Code 897
Platform Invoke 898
Pointers and Addresses 910
Executing Unsafe Code via a Delegate 920
Chapter 22: The Common Language Infrastructure 923
Defining the Common Language Infrastructure 924
CLI Implementations 925
.NET Standard 928
Base Class Library 929
C# Compilation to Machine Code 929
Runtime 932
Assemblies, Manifests, and Modules 936
Common Intermediate Language 939
Common Type System 939
Common Language Specification 940
Metadata 941
.NET Native and Ahead of Time Compilation 942
Index 945
Index of 7.0 Topics 995
Index of 6.0 Topics 998
Index of 5.0 Topics 1001
Figures xv
Tables xvii
Foreword xix
Preface xxi
Acknowledgments xxxiii
About the Author xxxv
Chapter 1: Introducing C# 1
Hello, World 2
C# Syntax Fundamentals 11
Working with Variables 20
Console Input and Output 24
Managed Execution and the Common Language Infrastructure 32
Multiple .NET Frameworks 37
Chapter 2: Data Types 43
Fundamental Numeric Types 44
More Fundamental Types 53
null and void 67
Conversions between Data Types 69
Chapter 3: More with Data Types 77
Categories of Types 77
Nullable Modifier 80
Tuples 83
Arrays 90
Chapter 4: Operators and Control Flow 109
Operators 110
Introducing Flow Control 126
Code Blocks ({}) 132
Code Blocks, Scopes, and Declaration Spaces 135
Boolean Expressions 137
Bitwise Operators (, , &, ^, ~) 147
Control Flow Statements, Continued 153
Jump Statements 165
C# Preprocessor Directives 171
Chapter 5: Methods and Parameters 181
Calling a Method 182
Declaring a Method 189
The using Directive 195
Returns and Parameters on Main() 200
Advanced Method Parameters 203
Recursion 215
Method Overloading 217
Optional Parameters 220
Basic Error Handling with Exceptions 225
Chapter 6: Classes 241
Declaring and Instantiating a Class 245
Instance Fields 249
Instance Methods 251
Using the this Keyword 252
Access Modifiers 259
Properties 261
Constructors 278
Static Members 289
Extension Methods 299
Encapsulating the Data 301
Nested Classes 304
Partial Classes 307
Chapter 7: Inheritance 313
Derivation 314
Overriding the Base Class 326
Abstract Classes 338
All Classes Derive from System.Object 344
Verifying the Underlying Type with the is Operator 345
Pattern Matching with the is Operator 346
Pattern Matching within a switch Statement 347
Conversion Using the as Operator 349
Chapter 8: Interfaces 353
Introducing Interfaces 354
Polymorphism through Interfaces 355
Interface Implementation 360
Converting between the Implementing Class and Its Interfaces 366
Interface Inheritance 366
Multiple Interface Inheritance 369
Extension Methods on Interfaces 369
Implementing Multiple Inheritance via Interfaces 371
Versioning 374
Interfaces Compared with Classes 375
Interfaces Compared with Attributes 377
Chapter 9: Value Types 379
Structs 383
Boxing 390
Enums 398
Chapter 10: Well-Formed Types 411
Overriding object Members 411
Operator Overloading 424
Referencing Other Assemblies 432
Defining Namespaces 442
XML Comments 445
Garbage Collection 449
Resource Cleanup 452
Lazy Initialization 461
Chapter 11: Exception Handling 465
Multiple Exception Types 465
Catching Exceptions 469
General Catch Block 473
Guidelines for Exception Handling 475
Defining Custom Exceptions 479
Rethrowing a Wrapped Exception 483
Chapter 12: Generics 487
C# without Generics 488
Introducing Generic Types 493
Constraints 506
Generic Methods 519
Covariance and Contravariance 524
Generic Internals 531
Chapter 13: Delegates and Lambda Expressions 537
Introducing Delegates 538
Declaring Delegate Types 542
Lambda Expressions 550
Anonymous Methods 556
Chapter 14: Events 575
Coding the Publish-Subscribe Pattern with Multicast Delegates 576
Understanding Events 591
Chapter 15: Collection Interfaces with Standard Query Operators 603
Collection Initializers 604
What Makes a Class a Collection: IEnumerable 607
Standard Query Operators 613
Anonymous Types with LINQ 646
Chapter 16: LINQ with Query Expressions 657
Introducing Query Expressions 658
Query Expressions Are Just Method Invocations 676
Chapter 17: Building Custom Collections 679
More Collection Interfaces 680
Primary Collection Classes 683
Providing an Indexer 702
Returning Null or an Empty Collection 705
Iterators 705
Chapter 18: Reflection, Attributes, and Dynamic Programming 721
Reflection 722
nameof Operator 733
Attributes 735
Programming with Dynamic Objects 759
Chapter 19: Multithreading 771
Multithreading Basics 774
Working with System.Threading 781
Asynchronous Tasks 789
Canceling a Task 810
The Task-based Asynchronous Pattern 816
Executing Loop Iterations in Parallel 846
Running LINQ Queries in Parallel 856
Chapter 20: Thread Synchronization 863
Why Synchronization? 864
Timers 893
Chapter 21: Platform Interoperability and Unsafe Code 897
Platform Invoke 898
Pointers and Addresses 910
Executing Unsafe Code via a Delegate 920
Chapter 22: The Common Language Infrastructure 923
Defining the Common Language Infrastructure 924
CLI Implementations 925
.NET Standard 928
Base Class Library 929
C# Compilation to Machine Code 929
Runtime 932
Assemblies, Manifests, and Modules 936
Common Intermediate Language 939
Common Type System 939
Common Language Specification 940
Metadata 941
.NET Native and Ahead of Time Compilation 942
Index 945
Index of 7.0 Topics 995
Index of 6.0 Topics 998
Index of 5.0 Topics 1001
Tables xvii
Foreword xix
Preface xxi
Acknowledgments xxxiii
About the Author xxxv
Chapter 1: Introducing C# 1
Hello, World 2
C# Syntax Fundamentals 11
Working with Variables 20
Console Input and Output 24
Managed Execution and the Common Language Infrastructure 32
Multiple .NET Frameworks 37
Chapter 2: Data Types 43
Fundamental Numeric Types 44
More Fundamental Types 53
null and void 67
Conversions between Data Types 69
Chapter 3: More with Data Types 77
Categories of Types 77
Nullable Modifier 80
Tuples 83
Arrays 90
Chapter 4: Operators and Control Flow 109
Operators 110
Introducing Flow Control 126
Code Blocks ({}) 132
Code Blocks, Scopes, and Declaration Spaces 135
Boolean Expressions 137
Bitwise Operators (, , &, ^, ~) 147
Control Flow Statements, Continued 153
Jump Statements 165
C# Preprocessor Directives 171
Chapter 5: Methods and Parameters 181
Calling a Method 182
Declaring a Method 189
The using Directive 195
Returns and Parameters on Main() 200
Advanced Method Parameters 203
Recursion 215
Method Overloading 217
Optional Parameters 220
Basic Error Handling with Exceptions 225
Chapter 6: Classes 241
Declaring and Instantiating a Class 245
Instance Fields 249
Instance Methods 251
Using the this Keyword 252
Access Modifiers 259
Properties 261
Constructors 278
Static Members 289
Extension Methods 299
Encapsulating the Data 301
Nested Classes 304
Partial Classes 307
Chapter 7: Inheritance 313
Derivation 314
Overriding the Base Class 326
Abstract Classes 338
All Classes Derive from System.Object 344
Verifying the Underlying Type with the is Operator 345
Pattern Matching with the is Operator 346
Pattern Matching within a switch Statement 347
Conversion Using the as Operator 349
Chapter 8: Interfaces 353
Introducing Interfaces 354
Polymorphism through Interfaces 355
Interface Implementation 360
Converting between the Implementing Class and Its Interfaces 366
Interface Inheritance 366
Multiple Interface Inheritance 369
Extension Methods on Interfaces 369
Implementing Multiple Inheritance via Interfaces 371
Versioning 374
Interfaces Compared with Classes 375
Interfaces Compared with Attributes 377
Chapter 9: Value Types 379
Structs 383
Boxing 390
Enums 398
Chapter 10: Well-Formed Types 411
Overriding object Members 411
Operator Overloading 424
Referencing Other Assemblies 432
Defining Namespaces 442
XML Comments 445
Garbage Collection 449
Resource Cleanup 452
Lazy Initialization 461
Chapter 11: Exception Handling 465
Multiple Exception Types 465
Catching Exceptions 469
General Catch Block 473
Guidelines for Exception Handling 475
Defining Custom Exceptions 479
Rethrowing a Wrapped Exception 483
Chapter 12: Generics 487
C# without Generics 488
Introducing Generic Types 493
Constraints 506
Generic Methods 519
Covariance and Contravariance 524
Generic Internals 531
Chapter 13: Delegates and Lambda Expressions 537
Introducing Delegates 538
Declaring Delegate Types 542
Lambda Expressions 550
Anonymous Methods 556
Chapter 14: Events 575
Coding the Publish-Subscribe Pattern with Multicast Delegates 576
Understanding Events 591
Chapter 15: Collection Interfaces with Standard Query Operators 603
Collection Initializers 604
What Makes a Class a Collection: IEnumerable 607
Standard Query Operators 613
Anonymous Types with LINQ 646
Chapter 16: LINQ with Query Expressions 657
Introducing Query Expressions 658
Query Expressions Are Just Method Invocations 676
Chapter 17: Building Custom Collections 679
More Collection Interfaces 680
Primary Collection Classes 683
Providing an Indexer 702
Returning Null or an Empty Collection 705
Iterators 705
Chapter 18: Reflection, Attributes, and Dynamic Programming 721
Reflection 722
nameof Operator 733
Attributes 735
Programming with Dynamic Objects 759
Chapter 19: Multithreading 771
Multithreading Basics 774
Working with System.Threading 781
Asynchronous Tasks 789
Canceling a Task 810
The Task-based Asynchronous Pattern 816
Executing Loop Iterations in Parallel 846
Running LINQ Queries in Parallel 856
Chapter 20: Thread Synchronization 863
Why Synchronization? 864
Timers 893
Chapter 21: Platform Interoperability and Unsafe Code 897
Platform Invoke 898
Pointers and Addresses 910
Executing Unsafe Code via a Delegate 920
Chapter 22: The Common Language Infrastructure 923
Defining the Common Language Infrastructure 924
CLI Implementations 925
.NET Standard 928
Base Class Library 929
C# Compilation to Machine Code 929
Runtime 932
Assemblies, Manifests, and Modules 936
Common Intermediate Language 939
Common Type System 939
Common Language Specification 940
Metadata 941
.NET Native and Ahead of Time Compilation 942
Index 945
Index of 7.0 Topics 995
Index of 6.0 Topics 998
Index of 5.0 Topics 1001