C# 10 in a Nutshell (E-book)

288,15 

Opis

C# 10 in a Nutshell (E-book)

When you have questions about C# 10 or .NET 6, this best-selling guide has the answers you need. C# is a language of unusual flexibility and breadth, and with its continual growth, theres always so much more to learn. In the tradition of OReillys Nutshell guides, this thoroughly updated edition is simply the best one-volume reference to the C# language available today.Organized around concepts and use cases, this comprehensive and complete reference provides intermediate and advanced programmers with a concise map of C# and .NET that also plumbs significant depths.Get up to speed on C#, from syntax and variables to advanced topics such as pointers, closures, and patternsDig deep into LINQ, with three chapters dedicated to the topicExplore concurrency and asynchrony, advanced threading, and parallel programmingWork with .NET features, including regular expressions, networking, assemblies, spans, reflection, and cryptography Spis treści: PrefaceIntended AudienceHow This Book Is OrganizedWhat You Need to Use This BookConventions Used in This BookUsing Code ExamplesOReilly Online LearningHow to Contact UsAcknowledgments1. Introducing C# and .NETObject OrientationType SafetyMemory ManagementPlatform SupportCLRs, BCLs, and RuntimesCommon Language RuntimeBase Class LibraryRuntimes.NET 6MAUIUWP and WinUI 3.NET FrameworkNiche RuntimesA Brief History of C#Whats New in C# 10File-scoped namespacesThe global using directiveNondestructive mutation for anonymous typesNew deconstruction syntaxField initializers and parameterless constructors in structsRecord structsLambda expression enhancementsNested property patternsCallerArgumentExpressionOther new featuresWhats New in C# 9.0Top-level statementsInit-only settersRecords Pattern-matching improvementsTarget-typed new expressionsInterop improvementsOther new featuresWhats New in C# 8.0Indices and rangesNull-coalescing assignmentUsing declarationsRead-only membersStatic local methodsDefault interface membersSwitch expressionsTuple, positional, and property patternsNullable reference typesAsynchronous streamsWhats New in C# 7.xC# 7.3C# 7.2C# 7.1Numeric literal improvementsOut variables and discardsType patterns and pattern variablesLocal methodsMore expression-bodied membersDeconstructorsTuplesthrow expressionsWhats New in C# 6.0Whats New in C# 5.0Whats New in C# 4.0Whats New in C# 3.0Whats New in C# 2.02. C# Language BasicsA First C# ProgramCompilationSyntaxIdentifiers and KeywordsContextual keywordsLiterals, Punctuators, and OperatorsCommentsType BasicsPredefined Type ExamplesCustom TypesMembers of a typeSymmetry of predefined types and custom typesConstructors and instantiationInstance versus static membersThe public keywordDefining namespacesDefining a Main methodTypes and ConversionsValue Types Versus Reference TypesValue typesReference typesNullStorage overheadPredefined Type TaxonomyNumeric TypesNumeric LiteralsNumeric literal type inferenceNumeric suffixesNumeric ConversionsConverting between integral typesConverting between floating-point typesConverting between floating-point and integral typesDecimal conversionsArithmetic OperatorsIncrement and Decrement OperatorsSpecialized Operations on Integral TypesDivisionOverflowOverflow check operatorsOverflow checking for constant expressionsBitwise operators8- and 16-Bit Integral TypesSpecial Float and Double Valuesdouble Versus decimalReal Number Rounding ErrorsBoolean Type and Operatorsbool ConversionsEquality and Comparison OperatorsConditional OperatorsConditional operator (ternary operator)Strings and CharactersChar ConversionsString TypeString concatenationString interpolationString comparisonsConstant interpolated strings (C# 10)ArraysDefault Element InitializationValue types versus reference typesIndices and RangesIndicesRangesMultidimensional ArraysRectangular arraysJagged arraysSimplified Array Initialization ExpressionsBounds CheckingVariables and ParametersThe Stack and the HeapStackHeapDefinite AssignmentDefault ValuesParametersPassing arguments by valueThe ref modifierThe out modifierOut variables and discardsImplications of passing by referenceThe in modifierThe params modifierOptional parametersNamed argumentsRef LocalsRef ReturnsvarImplicitly Typed Local VariablesTarget-Typed new ExpressionsExpressions and OperatorsPrimary ExpressionsVoid ExpressionsAssignment ExpressionsOperator Precedence and AssociativityPrecedenceLeft-associative operatorsRight-associative operatorsOperator TableNull OperatorsNull-Coalescing OperatorNull-Coalescing Assignment OperatorNull-Conditional OperatorStatementsDeclaration StatementsLocal variablesExpression StatementsSelection StatementsThe if statementThe else clauseChanging the flow of execution with bracesThe switch statementSwitching on typesSwitch expressionsIteration Statementswhile and do-while loopsfor loopsforeach loopsJump StatementsThe break statementThe continue statementThe goto statementThe return statementThe throw statementMiscellaneous StatementsNamespacesFile-Scoped Namespaces (C# 10)The using DirectiveThe global using Directive (C# 10)Implicit global usingsusing staticRules Within a NamespaceName scopingName hidingRepeated namespacesNested using directivesAliasing Types and NamespacesAdvanced Namespace FeaturesExternNamespace alias qualifiers3. Creating Types in C#ClassesFieldsThe readonly modifierField initializationDeclaring multiple fields togetherConstantsMethodsExpression-bodied methodsLocal methodsStatic local methodsLocal methods and top-level statementsOverloading methodsInstance ConstructorsOverloading constructorsImplicit parameterless constructorsConstructor and field initialization orderNonpublic constructorsDeconstructorsObject InitializersThe this ReferencePropertiesRead-only and calculated propertiesExpression-bodied propertiesAutomatic propertiesProperty initializersget and set accessibilityInit-only settersCLR property implementationIndexersImplementing an indexerCLR indexer implementationUsing indices and ranges with indexers Static ConstructorsStatic constructors and field initialization orderStatic ClassesFinalizersPartial Types and MethodsPartial methodsExtended partial methodsThe nameof operatorInheritancePolymorphismCasting and Reference ConversionsUpcastingDowncastingThe as operatorThe is operatorIntroducing a pattern variableVirtual Function MembersCovariant return typesAbstract Classes and Abstract MembersHiding Inherited Membersnew versus overrideSealing Functions and ClassesThe base KeywordConstructors and InheritanceImplicit calling of the parameterless base-class constructorConstructor and field initialization orderOverloading and ResolutionThe object TypeBoxing and UnboxingCopying semantics of boxing and unboxingStatic and Runtime Type CheckingThe GetType Method and typeof OperatorThe ToString MethodObject Member ListingStructsStruct Construction SemanticsThe default constructorRead-Only Structs and FunctionsRef StructsAccess ModifiersExamplesFriend AssembliesAccessibility CappingRestrictions on Access ModifiersInterfacesExtending an InterfaceExplicit Interface ImplementationImplementing Interface Members VirtuallyReimplementing an Interface in a SubclassAlternatives to interface reimplementationInterfaces and BoxingDefault Interface MembersEnumsEnum ConversionsFlags EnumsEnum OperatorsType-Safety IssuesNested TypesGenericsGeneric TypesWhy Generics ExistGeneric MethodsDeclaring Type Parameterstypeof and Unbound Generic TypesThe default Generic ValueGeneric ConstraintsSubclassing Generic TypesSelf-Referencing Generic DeclarationsStatic DataType Parameters and ConversionsCovarianceVariance is not automaticArraysDeclaring a covariant type parameterContravarianceC# Generics Versus C++ Templates4. Advanced C#DelegatesWriting Plug-In Methods with DelegatesInstance and Static Method TargetsMulticast DelegatesMulticast delegate exampleGeneric Delegate TypesThe Func and Action DelegatesDelegates Versus InterfacesDelegate CompatibilityType compatibilityParameter compatibilityReturn type compatibilityGeneric delegate type parameter varianceEventsStandard Event PatternEvent AccessorsEvent ModifiersLambda ExpressionsExplicitly Specifying Lambda Parameter and Return TypesCapturing Outer VariablesStatic lambdasCapturing iteration variablesLambda Expressions Versus Local MethodsAnonymous Methodstry Statements and ExceptionsThe catch ClauseException filtersThe finally BlockThe using statementusing declarationsThrowing Exceptionsthrow expressionsRethrowing an exceptionKey Properties of System.ExceptionCommon Exception TypesThe TryXXX Method PatternAlternatives to ExceptionsEnumeration and IteratorsEnumerationCollection InitializersIteratorsIterator Semanticsyield breakIterators and try/catch/finally blocksComposing SequencesNullable Value TypesNullable StructImplicit and Explicit Nullable ConversionsBoxing and Unboxing Nullable ValuesOperator LiftingEquality operators (== and !=)Relational operators (<, =, >)All other operators (+, , *, /, %, &, |, ^, <>, +, ++, –, !, ~)Mixing nullable and non-nullable operatorsbool? with & and | OperatorsNullable Value Types and Null OperatorsScenarios for Nullable Value TypesAlternatives to Nullable Value TypesNullable Reference TypesThe Null-Forgiving OperatorSeparating the Annotation and Warning ContextsTreating Nullable Warnings as ErrorsExtension MethodsExtension Method ChainingAmbiguity and ResolutionNamespacesExtension methods versus instance methodsExtension methods versus extension methodsDemoting an extension methodAnonymous TypesTuplesNaming Tuple ElementsType erasureValueTuple.CreateDeconstructing TuplesEquality ComparisonThe System.Tuple classesRecordsBackgroundDefining a RecordParameter listsNondestructive MutationProperty ValidationCalculated Fields and Lazy EvaluationPrimary ConstructorsRecords and Equality ComparisonPatternsvar PatternConstant PatternRelational PatternsPattern CombinatorsTuple and Positional PatternsProperty PatternsAttributesAttribute ClassesNamed and Positional Attribute ParametersApplying Attributes to Assemblies and Backing FieldsApplying Attributes to Lambda Expressions (C# 10)Specifying Multiple AttributesCaller Info AttributesCallerArgumentExpression (C# 10)Dynamic BindingStatic Binding Versus Dynamic BindingCustom BindingLanguage BindingRuntimeBinderExceptionRuntime Representation of DynamicDynamic Conversionsvar Versus dynamicDynamic ExpressionsDynamic Calls Without Dynamic ReceiversStatic Types in Dynamic ExpressionsUncallable FunctionsOperator OverloadingOperator FunctionsOverloading Equality and Comparison OperatorsCustom Implicit and Explicit ConversionsOverloading true and falseUnsafe Code and PointersPointer BasicsUnsafe CodeThe fixed StatementThe Pointer-to-Member OperatorThe stackalloc KeywordFixed-Size Buffersvoid*Native-Sized IntegersFunction Pointers[SkipLocalsInit]Preprocessor DirectivesConditional AttributesPragma WarningXML DocumentationStandard XML Documentation TagsUser-Defined TagsType or Member Cross-References5. .NET Overview.NET Standard.NET Standard 2.0.NET Standard 2.1Older .NET Standards.NET Framework and .NET 6 CompatibilityRuntime and C# Language VersionsReference AssembliesThe CLR and BCLSystem TypesText ProcessingCollectionsQueryingXML and JSONDiagnosticsConcurrency and AsynchronyStreams and Input/OutputNetworkingAssemblies, Reflection, and AttributesDynamic ProgrammingCryptographyAdvanced ThreadingParallel ProgrammingSpan and MemoryNative and COM InteroperabilityRegular ExpressionsSerializationThe Roslyn CompilerApplication LayersASP.NET CoreWindows DesktopWPFWindows FormsUWP and WinUI 3MAUI6. .NET FundamentalsString and Text HandlingCharStringConstructing stringsNull and empty stringsAccessing characters within a stringSearching within stringsManipulating stringsSplitting and joining stringsString.Format and composite format stringsComparing StringsOrdinal versus culture comparisonString equality comparisonString order comparisonStringBuilderText Encodings and UnicodeObtaining an Encoding objectEncoding for file and stream I/OEncoding to byte arraysUTF-16 and surrogate pairsDates and TimesTimeSpanDateTime and DateTimeOffsetChoosing between DateTime and DateTimeOffsetConstructing a DateTimeConstructing a DateTimeOffsetThe current DateTime/DateTimeOffsetWorking with dates and timesFormatting and parsing DateTimesNull DateTime and DateTimeOffset valuesDateOnly and TimeOnlyDateTime and Time ZonesDateTimeOffset and Time ZonesTimeZoneInfoTimeZoneTimeZoneInfoDaylight Saving Time and DateTimeFormatting and ParsingToString and ParseFormat ProvidersFormat providers and CultureInfoUsing NumberFormatInfo or DateTimeFormatInfoComposite formattingParsing with format providersIFormatProvider and ICustomFormatterStandard Format Strings and Parsing FlagsNumeric Format StringsNumberStylesDate/Time Format StringsParsing and misparsing DateTimesDateTimeStylesEnum Format StringsOther Conversion MechanismsConvertRounding real to integral conversionsParsing numbers in base 2, 8, and 16Dynamic conversionsBase-64 conversionsXmlConvertType ConvertersBitConverterGlobalizationGlobalization ChecklistTestingWorking with NumbersConversionsMathBigIntegerHalfComplexRandomBitOperationsEnumsEnum ConversionsEnum to integral conversionsIntegral to enum conversionsString conversionsEnumerating Enum ValuesHow Enums WorkThe Guid StructEquality ComparisonValue Versus Referential EqualityStandard Equality Protocols== and !=The virtual Object.Equals methodThe static object.Equals methodThe static object.ReferenceEquals methodThe IEquatable interfaceWhen Equals and == are not equalEquality and Custom TypesChanging the meaning of equalitySpeeding up equality comparisons with structsHow to override equality semanticsOverriding GetHashCodeOverriding EqualsOverloading == and !=Implementing IEquatableAn example: the Area structPluggable equality comparersOrder ComparisonIComparableIComparable versus EqualsImplementing the IComparable InterfacesUtility ClassesConsoleEnvironmentProcessRedirecting output and error streamsUseShellExecuteAppContext7. CollectionsEnumerationIEnumerable and IEnumeratorIEnumerable and IEnumeratorIEnumerable and IDisposableImplementing the Enumeration InterfacesThe ICollection and IList InterfacesICollection and ICollectionIList and IListIReadOnlyCollection and IReadOnlyListThe Array ClassConstruction and IndexingEnumerationLength and RankSearchingSortingReversing ElementsCopyingConverting and ResizingLists, Queues, Stacks, and SetsList and ArrayListLinkedListQueue and QueueStack and StackBitArrayHashSet and SortedSetDictionariesIDictionaryIDictionaryDictionary and HashtableOrderedDictionaryListDictionary and HybridDictionarySorted DictionariesCustomizable Collections and ProxiesCollection and CollectionBaseCollectionBaseKeyedCollection and DictionaryBaseDictionaryBaseReadOnlyCollectionImmutable CollectionsCreating Immutable CollectionsManipulating Immutable CollectionsBuildersImmutable Collections and PerformancePlugging in Equality and OrderIEqualityComparer and EqualityComparerEqualityComparer.DefaultReferenceEqualityComparer.Instance (.NET 5+)IComparer and ComparerStringComparerIStructuralEquatable and IStructuralComparable8. LINQ QueriesGetting StartedFluent SyntaxChaining Query OperatorsWhy extension methods are importantComposing Lambda ExpressionsLambda expressions and Func signaturesLambda expressions and element typingNatural OrderingOther OperatorsQuery ExpressionsRange VariablesQuery Syntax Versus SQL SyntaxQuery Syntax Versus Fluent SyntaxMixed-Syntax QueriesDeferred ExecutionReevaluationCaptured VariablesHow Deferred Execution WorksChaining DecoratorsHow Queries Are ExecutedSubqueriesSubqueries and Deferred ExecutionComposition StrategiesProgressive Query BuildingThe into KeywordScoping rulesWrapping QueriesProjection StrategiesObject InitializersAnonymous TypesThe let KeywordInterpreted QueriesHow Interpreted Queries WorkExecutionCombining Interpreted and Local QueriesAsEnumerableEF CoreEF Core Entity ClassesDbContextConfiguring the connectionConfiguring the ModelCreating the databaseUsing DbContextObject TrackingChange TrackingNavigation PropertiesAdding and removing entities from navigation collectionsLoading navigation propertiesLazy loadingDeferred ExecutionBuilding Query ExpressionsDelegates Versus Expression TreesCompiling expressio
n treesAsQueryableExpression TreesThe Expression DOM9. LINQ OperatorsOverviewSequenceSequenceFilteringProjectingJoiningOrderingGroupingSet operatorsConversion methods: ImportConversion methods: ExportSequenceElement or ValueElement operatorsAggregation methodsQuantifiersVoidSequenceGeneration methodsFilteringWhereQuery syntaxEnumerable.Where implementationOverviewIndexed filteringSQL LIKE comparisons in EF Core string comparisons in EF CoreWHERE x IN (, , ) in EF CoreTake, TakeLast, Skip, and SkipLastTakeWhile and SkipWhileDistinct and DistinctByProjectingSelectQuery syntaxEnumerable implementationOverviewIndexed projectionSelect subqueries and object hierarchiesSubqueries and joins in EF CoreProjecting into concrete typesSelectManyQuery syntaxEnumerable implementationOverviewMultiple range variablesThinking in query syntaxJoining with SelectManySelectMany in EF CoreOuter joins with SelectManyJoiningJoin and GroupJoinJoin argumentsGroupJoin argumentsQuery syntaxOverviewJoinJoining on multiple keysJoining in fluent syntaxGroupJoinFlat outer joinsJoining with lookupsEnumerable implementationsThe Zip OperatorOrderingOrderBy, OrderByDescending, ThenBy, and ThenByDescendingOrderBy and OrderByDescending argumentsThenBy and ThenByDescending argumentsQuery syntaxOverviewComparers and collationsIOrderedEnumerable and IOrderedQueryableGroupingGroupByQuery syntaxOverviewGroupBy in EF CoreGrouping by multiple keysCustom equality comparersChunkSet OperatorsConcat, Union, and UnionByIntersect, Intersect By, Except, and ExceptByConversion MethodsOfType and CastToArray, ToList, ToDictionary, ToHashSet, and ToLookupAsEnumerable and AsQueryableElement OperatorsFirst, Last, and SingleElementAtMinBy and MaxByDefaultIfEmptyAggregation MethodsCount and LongCountMin and MaxSum and AverageAggregateUnseeded aggregationsTraps with unseeded aggregationsQuantifiersContains and AnyAll and SequenceEqualGeneration MethodsEmptyRange and Repeat10. LINQ to XMLArchitectural OverviewWhat Is a DOM?The LINQ to XML DOMX-DOM OverviewLoading and ParsingSaving and SerializingInstantiating an X-DOMFunctional ConstructionSpecifying ContentAutomatic Deep CloningNavigating and QueryingChild Node NavigationFirstNode, LastNode, and NodesRetrieving elementsRetrieving a single elementRetrieving descendantsParent NavigationPeer Node NavigationAttribute NavigationUpdating an X-DOMSimple Value UpdatesUpdating Child Nodes and AttributesUpdating Through the ParentRemoving a sequence of nodes or attributesWorking with ValuesSetting ValuesGetting ValuesValues and Mixed Content NodesAutomatic XText ConcatenationDocuments and DeclarationsXDocumentXML DeclarationsWriting a declaration to a stringNames and NamespacesNamespaces in XMLPrefixesAttributesSpecifying Namespaces in the X-DOMThe X-DOM and Default NamespacesPrefixesAnnotationsProjecting into an X-DOMEliminating Empty ElementsStreaming a Projection11. Other XML and JSON TechnologiesXmlReaderReading NodesReading ElementsOptional elementsRandom element orderEmpty elementsOther ReadXXX methodsReading AttributesAttribute nodesNamespaces and PrefixesXmlWriterWriting AttributesWriting Other Node TypesNamespaces and PrefixesPatterns for Using XmlReader/XmlWriterWorking with Hierarchical DataMixing XmlReader/XmlWriter with an X-DOMUsing XmlReader with XElementUsing XmlWriter with XElementWorking with JSONUtf8JsonReaderJsonReaderOptionsUtf8JsonWriterJsonDocumentReading simple valuesReading JSON arraysReading JSON objectsJsonDocument and LINQ Making updates with a JSON writerJsonNodeReading simple valuesReading JSON arraysReading JSON objectsFluent traversal and LINQ Making updates with JsonNodeConstructing a JsonNode DOM programmatically12. Disposal and Garbage CollectionIDisposable, Dispose, and CloseStandard Disposal SemanticsClose and StopWhen to DisposeClearing Fields in DisposalAnonymous DisposalAutomatic Garbage CollectionRootsFinalizersCalling Dispose from a FinalizerResurrectionGC.ReRegisterForFinalizeHow the GC WorksOptimization TechniquesGenerational collectionThe Large Object HeapWorkstation versus server collectionBackground collectionGC notificationsForcing Garbage CollectionTuning Garbage Collection at RuntimeMemory PressureArray PoolingManaged Memory LeaksTimersDiagnosing Memory LeaksWeak ReferencesWeak References and CachingWeak References and Events13. DiagnosticsConditional CompilationConditional Compilation Versus Static Variable FlagsThe Conditional AttributeAlternatives to the Conditional attributeDebug and Trace ClassesFail and AssertTraceListenerFlushing and Closing ListenersDebugger IntegrationAttaching and BreakingDebugger AttributesProcesses and Process ThreadsExamining Running ProcessesExamining Threads in a ProcessStackTrace and StackFrameWindows Event LogsWriting to the Event LogReading the Event LogMonitoring the Event LogPerformance CountersEnumerating the Available CountersReading Performance Counter DataCreating Counters and Writing Performance DataThe Stopwatch ClassCross-Platform Diagnostic Toolsdotnet-countersdotnet-traceCustom trace eventsdotnet-dump14. Concurrency and AsynchronyIntroductionThreadingCreating a ThreadJoin and SleepBlockingI/O-bound versus compute-boundBlocking versus spinningLocal Versus Shared StateLocking and Thread SafetyPassing Data to a ThreadLambda expressions and captured variablesException HandlingCentralized exception handlingForeground Versus Background ThreadsThread PrioritySignalingThreading in Rich Client ApplicationsSynchronization ContextsThe Thread PoolEntering the thread poolHygiene in the thread poolTasksStarting a TaskWaitLong-running tasksReturning valuesExceptionsExceptions and autonomous tasksContinuationsTaskCompletionSourceTask.DelayPrinciples of AsynchronySynchronous Versus Asynchronous OperationsWhat Is Asynchronous Programming?Asynchronous Programming and ContinuationsWhy Language Support Is ImportantAsynchronous Functions in C#AwaitingCapturing local stateAwaiting in a UIComparison to coarse-grained concurrencyWriting Asynchronous FunctionsReturning TaskAsynchronous call graph executionParallelismAsynchronous Lambda ExpressionsAsynchronous StreamsQuerying IAsyncEnumerableIAsyncEnumerable in ASP.Net CoreAsynchronous Methods in WinRTAsynchrony and Synchronization ContextsException postingOperationStarted and OperationCompletedOptimizationsCompleting synchronouslyValueTaskPrecautions when using ValueTaskAvoiding excessive bouncingAsynchronous PatternsCancellationProgress ReportingIProgress and ProgressThe Task-Based Asynchronous PatternTask CombinatorsWhenAnyWhenAllCustom combinatorsAsynchronous LockingObsolete PatternsAsynchronous Programming ModelEvent-Based Asynchronous PatternBackgroundWorker15. Streams and I/OStream ArchitectureUsing StreamsReading and WritingSeekingClosing and FlushingTimeoutsThread SafetyBacking Store StreamsFileStreamConstructing a FileStreamSpecifying a filenameSpecifying a FileModeAdvanced FileStream featuresMemoryStreamPipeStreamNamed pipesAnonymous pipesBufferedStreamStream AdaptersText AdaptersStreamReader and StreamWriterCharacter encodingsStringReader and StringWriterBinary AdaptersClosing and Disposing Stream AdaptersCompression StreamsCompressing in MemoryUnix gzip File CompressionWorking with ZIP FilesFile and Directory OperationsThe File ClassCompression and encryption attributesFile securityThe Directory ClassFileInfo and DirectoryInfoPathSpecial FoldersQuerying Volume InformationCatching Filesystem EventsOS SecurityRunning in a Standard User AccountAdministrative Elevation and VirtualizationMemory-Mapped FilesMemory-Mapped Files and Random File I/OMemory-Mapped Files and Shared Memory (Windows)Cross-Platform Interprocess Shared MemoryWorking with View Accessors16. NetworkingNetwork ArchitectureAddresses and PortsURIsHttpClientGetAsync and Response MessagesSendAsync and Request MessagesUploading Data and HttpContentHttpMessageHandlerUnit testing and mockingChaining handlers with DelegatingHandlerProxiesAuthenticationCredentialCacheAuthenticating via headersHeadersQuery StringsUploading Form DataCookiesWriting an HTTP ServerUsing DNSSending Mail with SmtpClientUsing TCPConcurrency with TCPReceiving POP3 Mail with TCP17. AssembliesWhats in an AssemblyThe Assembly ManifestSpecifying assembly attributesThe Application Manifest (Windows)Deploying an application manifestModulesThe Assembly ClassStrong Names and Assembly SigningHow to Strongly Name an AssemblyAssembly NamesFully Qualified NamesThe AssemblyName ClassAssembly Informational and File VersionsAuthenticode SigningHow to Sign with AuthenticodeObtaining and installing a certificateSigning with signtool.exeTime stampingVerifying that a program has been signedResources and Satellite AssembliesDirectly Embedding Resources.resources Files.resx FilesReading .resources filesCreating a pack URI resource in Visual StudioSatellite AssembliesBuilding satellite assembliesTesting satellite assembliesVisual Studio designer supportCultures and SubculturesLoading, Resolving, and Isolating AssembliesAssembly Load ContextsLoading assembliesLoadFromAssemblyNameResolving assembliesThe Default ALCDefault probingThe Current ALCAssembly.Load and Contextual ALCsEnterContextualReflectionLoading and Resolving Unmanaged LibrariesAssemblyDependencyResolverUnloading ALCsThe Legacy Loading MethodsLoadFromLoadFile and Load(byte[])Writing a Plug-In SystemPlugin.CommonCapitalizer (plug-in)Plugin.HostAdding dependencies18. Reflection and MetadataReflecting and Activating TypesObtaining a TypeTypeInfoObtaining array typesObtaining nested typesType NamesNested type namesGeneric type namesArray and pointer type namesref and out parameter type namesBase Types and InterfacesInstantiating TypesGeneric TypesReflecting and Invoking MembersMember TypesC# Members Versus CLR MembersInit-only propertiesNullabilityContextInfoGeneric Type MembersDynamically Invoking a MemberMethod ParametersDealing with ref and out parametersRetrieving and invoking generic methodsUsing Delegates for PerformanceAccessing Nonpublic MembersThe BindingFlags enumGeneric MethodsAnonymously Calling Members of a Generic InterfaceReflecting AssembliesModulesWorking with AttributesAttribute BasicsThe AttributeUsage AttributeDefining Your Own AttributeRetrieving Attributes at RuntimeDynamic Code GenerationGenerating IL with DynamicMethodThe Evaluation StackPassing Arguments to a Dynamic MethodGenerating Local VariablesBranchingInstantiating Objects and Calling Instance MethodsException HandlingEmitting Assemblies and TypesThe Reflection.Emit Object ModelEmitting Type MembersEmitting MethodsGenerating instance methodsOverriding methodsHideBySigEmitting Fields and PropertiesEmitting ConstructorsCalling base constructorsAttaching AttributesEmitting Generic Methods and TypesDefining Generic MethodsDefining Generic TypesAwkward Emission TargetsUncreated Closed GenericsCircular DependenciesParsing ILWriting a Disassembler19. Dynamic ProgrammingThe Dynamic Language RuntimeNumeric Type UnificationDynamic Member Overload ResolutionSimplifying the Visitor PatternVariationsAnonymously Calling Members of a Generic TypeImplementing Dynamic ObjectsDynamicObjectExpandoObjectInteroperating with Dynamic LanguagesPassing State Between C# and a Script20. CryptographyOverviewWindows Data ProtectionHashingHash Algorithms in .NETHashing PasswordsSymmetric EncryptionEncrypting in MemoryChaining Encryption StreamsDisposing Encryption ObjectsKey ManagementPublic-Key Encryption and SigningThe RSA ClassDigital Signing21. Advanced ThreadingSynchronization OverviewExclusive LockingThe lock StatementMonitor.Enter and Monitor.ExitThe lockTaken overloadsTryEnterChoosing the Synchronization ObjectWhen to LockLocking and AtomicityNested LockingDeadlocksPerformanceMutexLocking and Thread SafetyThread Safety and .NET TypesLocking around thread-safe objectsStatic membersRead-only thread safetyThread Safety in Application ServersImmutable ObjectsNonexclusive LockingSemaphoreAsynchronous semaphores and locksWriting an EnterAsync extension methodParallel.ForEachAsyncReader/Writer LocksUpgradeable locksLock recursionSignaling with Event Wait HandlesAutoResetEventTwo-way signalingManualResetEventCountdownEventCreating a Cross-Process EventWaitHandleWait Handles and ContinuationsWaitAny, WaitAll, and SignalAndWaitAlternatives to WaitAll and SignalAndWaitThe Barrier ClassLazy InitializationLazyLazyInitializerThread-Local Storage[ThreadStatic]ThreadLocalThreadLocal and instance fieldsGetData and SetDataAsyncLocalTimersPeriodicTimerMultithreaded TimersSingle-Threaded Timers22. Parallel ProgrammingWhy PFX?PFX ConceptsPFX ComponentsWhen to Use PFXPLINQParallel Execution BallisticsPLINQ and OrderingPLINQ LimitationsExample: Parallel SpellcheckerUsing ThreadLocalFunctional PuritySetting the Degree of ParallelismChanging the degree of parallelismCancellationOptimizing PLINQOutput-side optimizationInput-side optimizationOptimizing custom aggregationsThe Parallel ClassParallel.InvokeParallel.For and Parallel.ForEachOuter versus inner loopsIndexed Parallel.ForEachParallelLoopState: Breaking early out of loopsOptimization with local valuesTask ParallelismCreating and Starting TasksSpecifying a state objectTaskCreationOptionsChild tasksWaiting on Multiple TasksCanceling TasksContinuationsContinuations and TaskContinuations and exceptionsContinuations and child tasksConditional continuationsContinuations with multiple antecedentsMultiple continuations on a single antecedentTask SchedulersTaskFactoryCreating your own task factoriesWorking with AggregateExceptionFlatten and HandleFlattenHandleConcurrent CollectionsIProducerConsumerCollectionConcurrentBagBlockingCollectionWriting a Producer/Consumer QueueUsing Tasks23. Span and MemorySpans and SlicingCopyTo and TryCopyToWorking with TextMemoryForward-Only EnumeratorsWorking with Stack-Allocated and Unmanaged Memory24. Native and COM InteroperabilityCalling into Native DLLsType and Parameter MarshalingMarshaling Common TypesMarshaling Classes and StructsIn and Out MarshalingCalling ConventionsCallbacks from Unmanaged CodeCallbacks with Function PointersUnmanagedCallersOnlyNondefault calling conventionsCallbacks with DelegatesSimulating a C UnionShared MemoryMapping a Struct to Unmanaged Memoryfixed and fixed {…}COM InteroperabilityThe Purpose of COMThe Basics of the COM Type SystemIUnknown and IDispatchCalling a COM Component from C#Optional Parameters and Named ArgumentsImplicit ref ParametersIndexersDynamic BindingEmbedding Interop TypesType EquivalenceExposing C# Objects to COMEnabling Registry-Free COM25. Regular ExpressionsRegular Expression BasicsCompiled Regular ExpressionsRegexOptionsCharacter EscapesCharacter SetsQuantifiersGreedy Versus Lazy QuantifiersZero-Width AssertionsLookahead and LookbehindAnchorsWord BoundariesGroupsNamed GroupsReplacing and Splitting TextMatchEvaluator DelegateSplitting TextCookbook Regular ExpressionsRecipesMatching US Social Security number/phone numberExtracting name = value pairs (one per line)Strong password validationLines of at least 80 charactersParsing dates/times (N/N/N H:M:S AM/PM)Matching Roman numeralsRemoving repeated wordsWord countMatching a GUIDParsing an XML/HTML tagSplitting a camel-cased wordObtaining a legal filenameEscaping Unicode characters for HTMLUnescaping characters in an HTTP query stringParsing Google search terms from a web stats logRegular Expressions Language ReferenceIndex

Pozostałe E-booki

kulkowe, majonez winiary kcal, tequila czaszka, playmobil kamper, breloczek, inpost opole kontakt, pisaki suchoscieralne, lasagne makaron, bigpack, groszek z marchewką mrożony, śmietanka 30, cena rabarbaru 2021, kamil kossakowski, słoik na jogurt, pucio gdzie to położyć, carlo rossi smooth red wine jakie to wino, sumlinski jedwabne, vans old skool czarne, kx, tablica magnetyczna 100×80, bagietka żytnia

yyyyy