Conventions Used in This BookUsing Code ExamplesSafari® Books OnlineHow to Contact UsA First C# ProgramCompilationSyntaxIdentifiers and KeywordsLiterals, Punctuators, and OperatorsCommentsType BasicsPredefined Type ExamplesCustom Type ExamplesConversionsValue Types Versus Reference TypesPredefined Type TaxonomyNumeric TypesNumeric LiteralsNumeric ConversionsArithmetic OperatorsIncrement and Decrement OperatorsSpecialized Integral Operations8- and 16-Bit IntegralsSpecial Float and Double Valuesdouble Versus decimalReal Number Rounding ErrorsBoolean Type and OperatorsEquality and Comparison OperatorsConditional OperatorsStrings and CharactersString TypeArraysDefault Element InitializationMultidimensional ArraysSimplified Array Initialization ExpressionsVariables and ParametersThe Stack and the HeapDefinite AssignmentDefault ValuesParametersvar—Implicitly Typed Local VariablesExpressions and OperatorsAssignment ExpressionsOperator Precedence and AssociativityOperator TableNull OperatorsNull Coalescing OperatorNull-Conditional Operator (C# 6)StatementsDeclaration StatementsExpression StatementsSelection StatementsIteration StatementsJump StatementsNamespacesThe using Directiveusing static (C# 6)Rules Within a NamespaceAliasing Types and NamespacesClassesFieldsMethodsInstance ConstructorsObject InitializersThe this ReferencePropertiesIndexersConstantsStatic ConstructorsStatic ClassesFinalizersPartial Types and MethodsThe nameof Operator (C# 6)InheritancePolymorphismCasting 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 SemanticsAccess ModifiersFriend AssembliesAccessibility CappingInterfacesExtending an InterfaceExplicit Interface ImplementationImplementing Interface Members VirtuallyReimplementing an Interface in a SubclassEnumsEnum 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 DelegatesMulticast DelegatesInstance Versus Static Method TargetsGeneric Delegate TypesThe Func and Action DelegatesDelegate CompatibilityEventsStandard Event PatternEvent AccessorsLambda ExpressionsCapturing Outer VariablesAnonymous Methodstry Statements and ExceptionsThe catch ClauseThe finally BlockThrowing ExceptionsKey Properties of System.ExceptionCommon Exception TypesEnumeration and IteratorsEnumerationCollection InitializersIteratorsIterator SemanticsComposing SequencesNullable TypesNullable<T> StructNullable ConversionsBoxing/Unboxing Nullable ValuesOperator Liftingbool? with & and | OperatorsNullable Types and Null OperatorsOperator OverloadingOperator FunctionsOverloading Equality and Comparison OperatorsCustom Implicit and Explicit ConversionsExtension MethodsExtension Method ChainingAmbiguity and ResolutionAnonymous TypesLINQLINQ 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 FunctionsAttributesAttribute 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 ExpressionsUnsafe Code and PointersPointer BasicsUnsafe CodeThe fixed StatementThe Pointer-to-Member OperatorArraysvoid*Preprocessor DirectivesPragma WarningXML DocumentationStandard XML Documentation Tags