CompilationSyntaxIdentifiers and KeywordsLiterals, Punctuators, and OperatorsCommentsType BasicsPredefined Type ExamplesCustom Type ExamplesTypes and ConversionsValue Types Versus Reference TypesPredefined Type TaxonomyNumeric TypesNumeric LiteralsNumeric ConversionsArithmetic OperatorsIncrement and Decrement OperatorsSpecialized Integral Operations8- and 16-Bit Integral TypesSpecial Float and Double Valuesdouble Versus decimalReal Number Rounding ErrorsBoolean Type and OperatorsEquality and Comparison OperatorsConditional OperatorsStrings and CharactersString TypeArraysDefault Element InitializationIndices and RangesMultidimensional ArraysSimplified Array Initialization ExpressionsVariables and ParametersThe Stack and the HeapDefinite AssignmentDefault ValuesParametersvar—Implicitly Typed Local VariablesTarget-Typed new Expressions (C# 9)Expressions and OperatorsAssignment ExpressionsOperator Precedence and AssociativityOperator TableNull OperatorsNull-Coalescing OperatorNull-Coalescing Assignment OperatorNull-Conditional OperatorStatementsDeclaration StatementsExpression StatementsSelection StatementsIteration StatementsJump StatementsNamespacesThe using Directiveusing staticRules Within a NamespaceAliasing Types and NamespacesClassesFieldsConstantsMethodsInstance ConstructorsDeconstructorsObject InitializersThe this ReferencePropertiesIndexersStatic ConstructorsStatic ClassesFinalizersPartial Types and MethodsThe nameof OperatorInheritancePolymorphismCasting and Reference ConversionsVirtual Function MembersAbstract Classes and Abstract MembersHiding Inherited MembersSealing Functions and ClassesThe base KeywordConstructors and InheritanceOverloading and ResolutionThe object TypeBoxing and UnboxingStatic and Runtime Type CheckingThe GetType Method and typeof OperatorObject Member ListingEquals, ReferenceEquals, and GetHashCodeThe ToString MethodStructsStruct Construction Semanticsreadonly Structs and FunctionsAccess ModifiersFriend AssembliesAccessibility CappingInterfacesExtending an InterfaceExplicit Interface ImplementationImplementing Interface Members VirtuallyReimplementing an Interface in a SubclassDefault Interface MembersEnumsEnum ConversionsFlags EnumsEnum OperatorsNested TypesGenericsGeneric TypesGeneric MethodsDeclaring Type Parameterstypeof and Unbound Generic TypesThe default Generic ValueGeneric ConstraintsSubclassing Generic TypesSelf-Referencing Generic DeclarationsStatic DataCovarianceContravarianceDelegatesWriting Plug-In Methods with DelegatesInstance and Static Method TargetsMulticast DelegatesGeneric Delegate TypesThe Func and Action DelegatesDelegate CompatibilityEventsStandard Event PatternEvent AccessorsLambda ExpressionsCapturing Outer VariablesLambda Expressions Versus Local MethodsAnonymous Methodstry Statements and ExceptionsThe catch ClauseThe finally BlockThrowing ExceptionsKey Properties of System.ExceptionEnumeration and IteratorsEnumerationCollection InitializersIteratorsIterator SemanticsComposing SequencesNullable Value TypesNullable<T> StructNullable ConversionsBoxing/Unboxing Nullable ValuesOperator Liftingbool? with & and | OperatorsNullable Types and Null OperatorsNullable Reference TypesExtension MethodsExtension Method ChainingAmbiguity and ResolutionAnonymous TypesTuplesNaming Tuple ElementsDeconstructing TuplesRecords (C# 9)Defining a RecordNondestructive MutationPrimary ConstructorsRecords and Equality ComparisonPatternsvar PatternConstant PatternRelational Patterns (C# 9)Pattern Combinators (C# 9)Tuple and Positional PatternsProperty PatternsLINQLINQ FundamentalsDeferred ExecutionStandard Query OperatorsChaining Query OperatorsQuery ExpressionsThe let KeywordQuery ContinuationsMultiple GeneratorsJoiningOrderingGroupingOfType and CastDynamic BindingStatic Binding Versus Dynamic BindingCustom BindingLanguage BindingRuntimeBinderExceptionRuntime Representation of dynamicDynamic Conversionsvar Versus dynamicDynamic ExpressionsDynamic Member Overload ResolutionUncallable FunctionsOperator OverloadingOperator FunctionsOverloading Equality and Comparison OperatorsCustom Implicit and Explicit ConversionsAttributesAttribute ClassesNamed and Positional Attribute ParametersAttribute TargetsSpecifying Multiple AttributesWriting Custom AttributesRetrieving Attributes at RuntimeCaller Info AttributesAsynchronous FunctionsThe await and async KeywordsCapturing Local StateWriting Asynchronous FunctionsParallelismAsynchronous Lambda ExpressionsAsynchronous StreamsUnsafe Code and PointersPointer BasicsUnsafe CodeThe fixed StatementThe Pointer-to-Member OperatorThe stackalloc KeywordFixed-Size Buffersvoid*Function Pointers (C# 9)Preprocessor DirectivesPragma WarningXML DocumentationStandard XML Documentation Tags