Target C# simple hands-on programming with visual studio 2022

So, you want to learn C# and Visual Studio 2022, but are a bit intimidated? Don't be. Programming is within your grasp! Programmers at any level have to fully understand, and more importantly, be able to code the core constructs. It is impossible to use complex programming concepts such as clas...

Descripción completa

Detalles Bibliográficos
Otros Autores: Byrne, Gerard, author (author)
Formato: Libro electrónico
Idioma:Inglés
Publicado: [Place of publication not identified] : Apress [2022]
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009689939206719
Tabla de Contenidos:
  • Intro
  • Table of Contents
  • About the Author
  • Acknowledgments
  • Introduction
  • Chapter 1: .NET
  • .NET: What Is It?
  • .NET Core: What Is It?
  • C# Language Versioning
  • .NET and C# Compilation Process
  • Compile Time and Runtime
  • Framework and Library
  • Library
  • Framework
  • Managed and Unmanaged Code
  • Chapter Summary
  • Chapter 2: Software Installation
  • About the .NET Framework
  • Installing the .NET Framework
  • Verify the .NET Framework Installation
  • Installing Visual Studio
  • Verify the Visual Studio Installation
  • Chapter Summary
  • Chapter 3: Introduction
  • Computer Program
  • Programming Languages
  • A Computer Program: A Recipe
  • Type in C#
  • The Basic Operations of a Computer
  • C# Program Application Formats
  • Format 1: Console Application
  • Format 2: .NET MAUI
  • Format 3: ASP.NET Web Applications
  • The Structure of a C# Program
  • Namespaces
  • Classes
  • Naming a Class: Class Identifiers
  • Chapter Summary
  • Chapter 4: Input and Output
  • Write to and Read from the Console
  • Change Console Display Settings
  • Chapter Summary
  • Chapter 5: Commenting Code
  • C# Single-Line Comments
  • New .NET 6 Templates
  • C# Multiple-Line Comments
  • Chapter Summary
  • Chapter 6: Data Types
  • Data Types, Variables, and Conversion
  • Data Types
  • Conversion from One Data Type to Another
  • Converting
  • Something a Little Different with Our Variables
  • C# 8 Nullable Reference Types
  • Chapter Summary
  • Chapter 7: Casting and Parsing
  • Data Types, Casting, and Parsing
  • Chapter Summary
  • Chapter 8: Arithmetic
  • Arithmetic Operations
  • Common Arithmetic Operators
  • Integer Division
  • Solution Explorer and Project Analysis
  • Other Operators
  • Plus Equals ( +=)
  • Minus Equals ( -=)
  • Multiply Equals ( *=)
  • Divide Equals ( /=)
  • Square Root
  • Chapter Summary
  • Chapter 9: Selection
  • Arithmetic Operations.
  • Selection
  • Comparison Operators
  • The if Construct
  • The if-else Construct
  • The if else if Construct
  • The switch Construct
  • The switch Construct Using when
  • switch with Strings
  • switch with Strings
  • Additional Example
  • Logical Operators
  • Using the AND Operator
  • Using the OR Operator
  • Using the NOT Operator
  • Conditional Operator (Ternary Operator)
  • Nested Ternary Conditional Operator
  • Chapter Summary
  • Chapter 10: Iteration
  • Iteration and Loops
  • Introduction to Iteration
  • For Loop
  • Break Statement
  • Continue Statement
  • While Loop
  • Break Statement
  • Continue Statement
  • Do (While) Loop
  • Break Statement
  • Continue Statement
  • Chapter Summary
  • Chapter 11: Arrays
  • Arrays: A Data Structure
  • Single-Dimensional Arrays
  • Choice 1: Declaring and Creating an Array in Two Stages
  • Choice 2: Declaring and Creating an Array in One Stage
  • Referencing the Array Elements
  • foreach Loop
  • IndexOutOfBounds Exception
  • Ranges and Indices: C# 8 and Above
  • Range
  • Chapter Summary
  • Chapter 12: Methods
  • Methods: Modularization
  • Methods: Concepts of Methods and Functions
  • Some Points Regarding Methods
  • Three Types of Methods
  • Void Methods
  • Value Methods
  • Parameter Methods
  • Method Overloading
  • C# 7 Local Function
  • C# 8 Static Local Function
  • C# 10 Null Parameter Checking
  • C# 10 Null Parameter Checking Approach
  • Chapter Summary
  • Chapter 13: Classes
  • Classes and Objects in OOP
  • A Class Is a Data Structure
  • Type 1: Fields
  • Type 2: Constants
  • Type 3: Methods
  • Type 4: Properties
  • Type 5: Constructor
  • Constructor Overloading
  • Constructor
  • Another Constructor
  • Additional Example for Classes and Objects
  • CircleFormulae Class
  • RectangleFormulae Class
  • Chapter Summary
  • Chapter 14: Interfaces
  • Interfaces and Abstract Classes.
  • The Interface or Abstract Class as a Manager
  • Instantiate the Abstract Class?
  • Static Members of the Abstract Class
  • Concept of an Interface
  • Implementing Multiple Interfaces
  • Concept of Default Method in an Interface
  • Concept of Static Methods and Fields in an Interface
  • Chapter Summary
  • Chapter 15: String Handling
  • String Handling and Manipulation
  • String Literals
  • Substring
  • Length
  • StartsWith()
  • Split()
  • CompareTo()
  • ToUpper() and ToLower()
  • Concat()
  • Trim()
  • Replace()
  • Contains()
  • IndexOf()
  • Insert()
  • String.Format()
  • Formatting the Items in the String
  • String Interpolation
  • String Interpolation: Spacing
  • @ Verbatim
  • What About @ or @?
  • Const String Interpolation
  • Chapter Summary
  • Chapter 16: File Handling
  • File Handling
  • An Overview of File Handling
  • File Class
  • Writing to a File
  • WriteAllText()
  • WriteAllLines()
  • WriteAllBytes()
  • Reading from a File
  • ReadAllText()
  • ReadAllLines()
  • ReadAllBytes()
  • Copy a File
  • Copy()
  • Delete a File
  • Delete()
  • StreamReader Class
  • Stream
  • Synchronous and Asynchronous
  • StreamReader Class Methods
  • StreamWriter Class
  • Reading from a Stream
  • Writing to a Stream
  • Async Methods and Asynchronous Programming
  • WriteLineAsync
  • FileStream
  • FileModes
  • Chapter Summary
  • Chapter 17: Exception Handling
  • Exceptions
  • What Is an Exception?
  • try
  • catch
  • finally
  • throw
  • Multiple Exceptions
  • FileNotFoundException
  • finally
  • StackTrace
  • throw
  • rethrow
  • Chapter Summary
  • Chapter 18: Serialization
  • Serialization and Deserialization
  • Deserialization
  • Attribute [NonSerialized]
  • Serializing the Object
  • Deserializing the Serialized File to a Class
  • Access Modifier [NonSerialized]
  • Serialization Using XML
  • Serialization Using JSON
  • Chapter Summary
  • Chapter 19: Structs.
  • Concept of a Struct as a Structure Type
  • Difference Between Struct and Class
  • Struct with a Default Constructor Only
  • Struct with a User Constructor
  • Struct Instantiation Without the New Keyword
  • Struct Instantiation with the New Keyword
  • Creating a Constructor
  • Creating Member Properties (Get and Set Accessors)
  • Encapsulation
  • Readonly Struct
  • Creating a Readonly Struct
  • C# 8 readonly Members
  • C# 8 Nullable Reference Types
  • Chapter Summary
  • Chapter 20: Enumerations
  • Concept of Enumerations
  • Defining an Enumeration
  • Enumeration Examples
  • Enumerated Values: Use and Scope
  • Enumeration Methods
  • Using the foreach Iteration
  • Enumeration Values: GetValues()
  • Assigning Our Own Values to the Enumeration
  • Use the GetName() and GetValues() Methods
  • Sample Application Using Enumerations
  • Chapter Summary
  • Chapter 21: Delegates
  • Concept of Delegates
  • Single Delegate
  • Declare the Delegate with Its Return Type and Method Signature
  • Instantiate the Delegate and Set Its Target Method
  • Invoke the Delegate
  • Multicast Delegates
  • Instantiate the Delegate Again and Set the New Instances' Target Method
  • Chain the Delegates
  • Invoke the Multicast Delegate
  • More Complex Example
  • Chapter Summary
  • Chapter 22: Events
  • Concept of Events
  • Publisher and Subscriber
  • Declare an Event
  • Raise an Event
  • Handle an Event
  • Add a Method to an Event Using +=
  • Refer the Event to a Second Method Using +=
  • Refer the Event to a Third Method Using +=
  • Remove a Method from an Event Using -=
  • Chapter Summary
  • Chapter 23: Generics
  • Concept of Generics
  • Generic Class, Generic Method, Generic Parameters
  • Generic Class, Generic Method, Mixed Parameter Types
  • Generic Method Only
  • Chapter Summary
  • Chapter 24: Common Routines
  • Common Programming Routines with C#
  • Linear Search.
  • Create an Application That Will Implement a Linear Search
  • Binary Search (Iterative Binary Search)
  • Bubble Sort
  • Insertion Sort
  • Chapter Summary
  • Chapter 25: Programming Labs
  • C# Practice Exercises
  • Chapter 4 Labs: WriteLine()
  • Lab 1
  • Lab 2
  • Lab 3
  • Lab 4
  • Lab 1: Possible Solution with output shown in Figure 25-1
  • Lab 2: Possible Solution with output shown in Figure 25-2
  • Lab 3: Possible Solution with output shown in Figure 25-3
  • Lab 4: Possible Solution with output shown in Figure 25-4
  • Chapter 6 Labs: Data Types
  • Lab 1
  • Lab 2
  • Lab 3
  • Lab 4
  • Lab 1: Possible Solution with output shown in Figure 25-5
  • Lab 2: Possible Solution with output shown in Figure 25-6
  • Lab 3: Possible Solution with output shown in Figure 25-7
  • Lab 4: Possible Solution with output shown in Figure 25-8
  • Chapter 7 Labs: Data Conversion and Arithmetic
  • Lab 1
  • Lab 2
  • Lab 1: Possible Solution with output shown in Figure 25-9
  • Lab 2: Possible Solution with output shown in Figure 25-10
  • Chapter 8 Labs: Arithmetic
  • Lab 1
  • Lab 1: Possible Solution with output shown in Figure 25-11
  • Chapter 9 Labs: Selection
  • Lab 1
  • Lab 2
  • Lab 3
  • Lab 1: Possible Solution with output shown in Figure 25-12
  • Lab 2: Possible Solution with output shown in Figure 25-13
  • Lab 3: Possible Solution with output shown in Figure 25-14
  • Chapter 10 Labs: Iteration
  • Lab 1
  • Lab 2
  • Lab 3
  • Lab 4
  • Lab 1: Possible Solution with output shown in Figure 25-15
  • Lab 2: Possible Solution with output shown in Figure 25-16
  • Lab 3: Possible Solution with output shown in Figure 25-17
  • Lab 4: Possible Solution with output shown in Figure 25-18
  • Chapter 11 Labs: Arrays
  • Lab 1
  • Lab 2
  • Lab 3
  • Lab 1: Possible Solution with output shown in Figure 25-19
  • Lab 2: Possible Solution with output shown in Figure 25-20.
  • Lab 3: Possible Solution with output shown in Figure 25-21.