Beginning C# and .NET. (2021)
- Record Type:
- Book
- Title:
- Beginning C# and .NET. (2021)
- Main Title:
- Beginning C# and .NET
- Further Information:
- Note: Benjamin Perkins, Jon D. Reid.
- Authors:
- Perkins, Benjamin
Reid, Jon D - Contents:
- Introduction xxvii Part I: The C# Language Chapter 1: Introducing C# 3 What Is .NET? 3 .NET Framework, .NET Standard, and .NET Core 4 Writing Programs Using .NET 5 CIL and JIT 5 Assemblies 6 Managed Code 7 Garbage Collection 7 Fitting It Together 7 Linking 8 What Is C#? 8 Applications You Can Write with C# 9 C# in This Book 10 Visual Studio 10 Visual Studio Products 10 Solutions 11 Chapter 2: Writing a C# Program 13 The Visual Studio Development Environment 14 Console Applications 18 The Solution Explorer 21 The Properties Window 22 The Error List Window 23 Desktop Applications 23 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 Binary Literals and Digit Separators 40 String Literals 41 Expressions 42 Mathematical Operators 43 Assignment Operators 48 Operator Precedence 49 Namespaces 50 Chapter 4: Flow Control 55 Boolean Logic 56 Boolean Bitwise and Assignment Operators 58 Operator Precedence Updated 60 Branching 60 The Ternary Operator 61 The if Statement 61 Checking More Conditions Using if Statements 64 The switch Statement 65 Looping 68 do Loops 68 while Loops 71 for Loops 73 Interrupting Loops 74 Infinite Loops 75 Chapter 5: More About Variables 79 Type Conversion 80 Implicit Conversions 80 Explicit Conversions 82 Explicit Conversions Using the Convert Commands 84 Complex Variable Types 87 Enumerations 87 Defining Enumerations 88 Structs 91 DefiningIntroduction xxvii Part I: The C# Language Chapter 1: Introducing C# 3 What Is .NET? 3 .NET Framework, .NET Standard, and .NET Core 4 Writing Programs Using .NET 5 CIL and JIT 5 Assemblies 6 Managed Code 7 Garbage Collection 7 Fitting It Together 7 Linking 8 What Is C#? 8 Applications You Can Write with C# 9 C# in This Book 10 Visual Studio 10 Visual Studio Products 10 Solutions 11 Chapter 2: Writing a C# Program 13 The Visual Studio Development Environment 14 Console Applications 18 The Solution Explorer 21 The Properties Window 22 The Error List Window 23 Desktop Applications 23 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 Binary Literals and Digit Separators 40 String Literals 41 Expressions 42 Mathematical Operators 43 Assignment Operators 48 Operator Precedence 49 Namespaces 50 Chapter 4: Flow Control 55 Boolean Logic 56 Boolean Bitwise and Assignment Operators 58 Operator Precedence Updated 60 Branching 60 The Ternary Operator 61 The if Statement 61 Checking More Conditions Using if Statements 64 The switch Statement 65 Looping 68 do Loops 68 while Loops 71 for Loops 73 Interrupting Loops 74 Infinite Loops 75 Chapter 5: More About Variables 79 Type Conversion 80 Implicit Conversions 80 Explicit Conversions 82 Explicit Conversions Using the Convert Commands 84 Complex Variable Types 87 Enumerations 87 Defining Enumerations 88 Structs 91 Defining Structs 92 Arrays 94 Declaring Arrays 95 foreach Loops 98 Pattern Matching with switch case Expression 98 Multidimensional Arrays 102 Arrays of Arrays 104 String Manipulation 105 Chapter 6: Functions 113 Defining and Using Functions 114 Return Values 117 Parameters 118 Parameter Matching 121 Parameter Arrays 121 Reference and Value Parameters 123 Out Parameters 125 Tuples 126 Variable Scope 128 Variable Scope in Other Structures 131 Parameters and Return Values versus Global Data 132 Local Functions 134 The Main() Function 135 Struct Functions 137 Overloading Functions 138 Using Delegates 140 Chapter 7: Debugging And Error Handling 145 Debugging in Visual Studio 146 Debugging in Nonbreak (Normal) Mode 147 Outputting Debugging Information 148 Tracepoints 152 Diagnostics Output versus Tracepoints 154 Debugging in Break Mode 155 Entering Break Mode 155 Monitoring Variable Content 158 Stepping through Code 161 Immediate and Command Windows 162 The Call Stack Window 163 Error Handling 163 try. . .catch. . .finally 164 Throw Expressions 172 Listing and Configuring Exceptions 172 Chapter 8: Introduction To Object-Oriented Programming 175 What Is Object-Oriented Programming? 176 What Is an Object? 177 Properties and Fields 178 Methods 179 Everything’s an Object 180 The Life Cycle of an Object 180 Constructors 180 Destructors 181 Static and Instance Class Members 181 Static Constructors 181 Static Classes 182 OOP Techniques 182 Interfaces 182 Disposable Objects 184 Inheritance 184 Polymorphism 187 Interface Polymorphism 188 Relationships between Objects 189 Containment 189 Collections 190 Operator Overloading 191 Events 191 Reference Types versus Value Types 192 OOP in Desktop Applications 192 Chapter 9: Defining Classes 199 Class Definitions in C# 200 Interface Definitions 202 System.Object 205 Constructors and Destructors 207 Constructor Execution Sequence 209 OOP Tools in Visual Studio 212 The Class View Window 212 The Object Browser 214 Adding Classes 216 Class Diagrams 217 Class Library Projects 219 Interfaces versus Abstract Classes 223 Struct Types 225 Shallow Copying versus Deep Copying 227 Chapter 10: Defining Class Members 231 Member Definitions 232 Defining Fields 232 Defining Methods 233 Defining Properties 234 Tuple Deconstruction 239 Refactoring Members 240 Automatic Properties 241 Additional Class Member Topics 242 Hiding Base Class Methods 242 Calling Overridden or Hidden Base Class Methods 244 The this Keyword 244 Using Nested Type Definitions 245 Interface Implementation 247 Implementing Interfaces in Classes 248 Explicit Interface Member Implementation 249 Additional Property Accessors 249 Partial Class Definitions 250 Partial Method Definitions 251 Example Application 252 Planning the Application 253 The Card Class 253 The Deck Class 253 Writing the Class Library 253 Adding the Suit and Rank Enumerations 254 Adding the Card Class 256 Adding the Deck Class 258 A Client Application for the Class Library 261 The Call Hierarchy Window 262 Chapter 11: Collections, Comparisons, and Conversions 265 Collections 266 Using Collections 267 Defining Collections 272 Indexers 273 Adding a CardCollection to CardLib 275 Keyed Collections and IDictionary 278 Iterators 279 Iterators and Collections 284 Deep Copying 285 Adding Deep Copying to CardLib 286 Comparisons 288 Type Comparisons 288 Boxing and Unboxing 289 The is Operator 290 Pattern Matching with the is Operator Pattern Expression 293 Value Comparisons 294 Operator Overloading 294 Adding Operator Overloads to CardLib 299 The IComparable and IComparer Interfaces 304 Sorting Collections 306 Conversions 309 Overloading Conversion Operators 310 The as Operator 311 Chapter 12: Generics 315 What Are Generics? 316 Using Generics 317 Nullable Types 317 Operators and Nullable Types 318 The ?? Operator 319 The ?. Operator 320 Working with Nullable Types 321 The System.Collections.Generic Namespace 325 List 326 Sorting and Searching Generic Lists 327 Dictionary<K, V> 333 Modifying CardLib to Use a Generic Collection Class 334 Defining Generic Types 335 Defining Generic Classes 336 The default Keyword 338 Constraining Types 338 Inheriting from Generi … (more)
- Edition:
- 2021st
- Publisher Details:
- Indianapolis : Wrox
- Publication Date:
- 2021
- Extent:
- 1 online resource
- Subjects:
- 005.133
C# (Computer program language) - Languages:
- English
- ISBNs:
- 9781119795834
- Notes:
- Note: Description based on CIP data; resource not viewed.
- Access Rights:
- Legal Deposit; Only available on premises controlled by the deposit library and to one user at any one time; The Legal Deposit Libraries (Non-Print Works) Regulations (UK).
- Access Usage:
- Restricted: Printing from this resource is governed by The Legal Deposit Libraries (Non-Print Works) Regulations (UK) and UK copyright law currently in force.
- View Content:
- Available online (eLD content is only available in our Reading Rooms) ↗
- Physical Locations:
- British Library HMNTS - ELD.DS.646314
- Ingest File:
- 06_043.xml