The Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow. Text content is released under Creative Commons BY-SA. See credits at the end of this book whom contributed to the various chapters. Images may be copyright of their respective owners unless otherwise specified
Book created for educational purposes and is not affiliated with group(s), company(s) nor Stack Overflow. All trademarks belong to their respective company owners
https://goalkicker.com/
章节目录
1-1
Content list
1-2
About
1-3
Chapter 1: Getting started with C# Language
1-4
Section 1.1: Creating a new console application (Visual Studio)
1-5
Section 1.2: Creating a new project in Visual Studio (console application) and Running it in Debug mode
1-6
Section 1.3: Creating a new program using .NET Core
1-7
Section 1.4: Creating a new program using Mono
1-8
Section 1.5: Creating a new query using LinqPad
1-9
Section 1.6: Creating a new project using Xamarin Studio
1-10
Chapter 2: Literals
1-11
Section 2.1: uint literals
1-12
Section 2.2: int literals
1-13
Section 2.3: sbyte literals
1-14
Section 2.4: decimal literals
1-15
Section 2.5: double literals
1-16
Section 2.6: float literals
1-17
Section 2.7: long literals
1-18
Section 2.8: ulong literal
1-19
Section 2.9: string literals
1-20
Section 2.10: char literals
1-21
Section 2.11: byte literals
1-22
Section 2.12: short literal
1-23
Section 2.13: ushort literal
1-24
Section 2.14: bool literals
1-25
Chapter 3: Operators
1-26
Section 3.1: Overloadable Operators
1-27
Section 3.2: Overloading equality operators
1-28
Section 3.3: Relational Operators
1-29
Section 3.4: Implicit Cast and Explicit Cast Operators
1-30
Section 3.5: Short-circuiting Operators
1-31
Section 3.6: ? : Ternary Operator
1-32
Section 3.7: ?. (Null Conditional Operator)
1-33
Section 3.8: "Exclusive or" Operator
1-34
Section 3.9: default Operator
1-35
Section 3.10: Assignment operator '='
1-36
Section 3.11: sizeof
1-37
Section 3.12: ?? Null-Coalescing Operator
1-38
Section 3.13: Bit-Shifting Operators
1-39
Section 3.14: => Lambda operator
1-40
Section 3.15: Class Member Operators: Null Conditional Member Access
1-41
Section 3.16: Class Member Operators: Null Conditional Indexing
1-42
Section 3.17: Postfix and Prefix increment and decrement
1-43
Section 3.18: typeof
1-44
Section 3.19: Binary operators with assignment
1-45
Section 3.20: nameof Operator
1-46
Section 3.21: Class Member Operators: Member Access
1-47
Section 3.22: Class Member Operators: Function Invocation
1-48
Section 3.23: Class Member Operators: Aggregate Object Indexing
1-49
Chapter 4: Conditional Statements
1-50
Section 4.1: If-Else Statement
1-51
Section 4.2: If statement conditions are standard boolean expressions and values
1-52
Section 4.3: If-Else If-Else Statement
1-53
Chapter 5: Equality Operator
1-54
Section 5.1: Equality kinds in c# and equality operator
1-55
Chapter 6: Equals and GetHashCode
1-56
Section 6.1: Writing a good GetHashCode override
1-57
Section 6.2: Default Equals behavior
1-58
Section 6.3: Override Equals and GetHashCode on custom types
1-59
Section 6.4: Equals and GetHashCode in IEqualityComparator
1-60
Chapter 7: Null-Coalescing Operator
1-61
Section 7.1: Basic usage
1-62
Section 7.2: Null fall-through and chaining
1-63
Section 7.3: Null coalescing operator with method calls
1-64
Section 7.4: Use existing or create new
1-65
Section 7.5: Lazy properties initialization with null coalescing operator
1-66
Chapter 8: Null-conditional Operators
1-67
Section 8.1: Null-Conditional Operator
1-68
Section 8.2: The Null-Conditional Index
1-69
Section 8.3: Avoiding NullReferenceExceptions
1-70
Section 8.4: Null-conditional Operator can be used with Extension Method
1-71
Chapter 9: nameof Operator
1-72
Section 9.1: Basic usage: Printing a variable name
1-73
Section 9.2: Raising PropertyChanged event
1-74
Section 9.3: Argument Checking and Guard Clauses
1-75
Section 9.4: Strongly typed MVC action links
1-76
Section 9.5: Handling PropertyChanged events
1-77
Section 9.6: Applied to a generic type parameter
1-78
Section 9.7: Printing a parameter name
1-79
Section 9.8: Applied to qualified identifiers
1-80
Chapter 10: Verbatim Strings
1-81
Section 10.1: Interpolated Verbatim Strings
1-82
Section 10.2: Escaping Double Quotes
1-83
Section 10.3: Verbatim strings instruct the compiler to not use character escapes
1-84
Section 10.4: Multiline Strings
1-85
Chapter 11: Common String Operations
1-86
Section 11.1: Formatting a string
1-87
Section 11.2: Correctly reversing a string
1-88
Section 11.3: Padding a string to a fixed length
1-89
Section 11.4: Getting x characters from the right side of a string
1-90
Section 11.5: Checking for empty String using String.IsNullOrEmpty() and String.IsNullOrWhiteSpace()
1-91
Section 11.6: Trimming Unwanted Characters O the Start and/or End of Strings
1-92
Section 11.7: Convert Decimal Number to Binary,Octal and Hexadecimal Format
1-93
Section 11.8: Construct a string from Array
1-94
Section 11.9: Formatting using ToString
1-95
Section 11.10: Splitting a String by another string
1-96
Section 11.11: Splitting a String by specific character
1-97
Section 11.12: Getting Substrings of a given string
1-98
Section 11.13: Determine whether a string begins with a given sequence
1-99
Section 11.14: Getting a char at specific index and enumerating the string
1-100
Section 11.15: Joining an array of strings into a new one
1-101
Section 11.16: Replacing a string within a string
1-102
Section 11.17: Changing the case of characters within a String
1-103
Section 11.18: Concatenate an array of strings into a single string
1-104
Section 11.19: String Concatenation
1-105
Chapter 12: String.Format
1-106
Section 12.1: Since C# 6.0
1-107
Section 12.2: Places where String.Format is 'embedded' in the framework
1-108
Section 12.3: Create a custom format provider
1-109
Section 12.4: Date Formatting
1-110
Section 12.5: Currency Formatting
1-111
Section 12.6: Using custom number format
1-112
Section 12.7: Align left/ right, pad with spaces
1-113
Section 12.8: Numeric formats
1-114
Section 12.9: ToString()
1-115
Section 12.10: Escaping curly brackets inside a String.Format() expression
1-116
Section 12.11: Relationship with ToString()
1-117
Chapter 13: String Concatenate
1-118
Section 13.1: + Operator
1-119
Section 13.2: Concatenate strings using System.Text.StringBuilder
1-120
Section 13.3: Concat string array elements using String.Join
1-121
Section 13.4: Concatenation of two strings using $
1-122
Chapter 14: String Manipulation
1-123
Section 14.1: Replacing a string within a string
1-124
Section 14.2: Finding a string within a string
1-125
Section 14.3: Removing (Trimming) white-space from a string
1-126
Section 14.4: Splitting a string using a delimiter
1-127
Section 14.5: Concatenate an array of strings into a single string
1-128
Section 14.6: String Concatenation
1-129
Section 14.7: Changing the case of characters within a String
1-130
Chapter 15: String Interpolation
1-131
Section 15.1: Format dates in strings
1-132
Section 15.2: Padding the output
1-133
Section 15.3: Expressions
1-134
Section 15.4: Formatting numbers in strings
1-135
Section 15.5: Simple Usage
1-136
Chapter 16: String Escape Sequences
1-137
Section 16.1: Escaping special symbols in string literals
1-138
Section 16.2: Unicode character escape sequences
1-139
Section 16.3: Escaping special symbols in character literals
1-140
Section 16.4: Using escape sequences in identifiers
1-141
Section 16.5: Unrecognized escape sequences produce compile-time errors
1-142
Chapter 17: StringBuilder
1-143
Section 17.1: What a StringBuilder is and when to use one
1-144
Section 17.2: Use StringBuilder to create string from a large number of records