Skip to content

Modernize next System.Diagnostics C# snippets - #13033

Open
gewarren wants to merge 6 commits into
mainfrom
gewarren-modernize-system-diagnostics-2
Open

Modernize next System.Diagnostics C# snippets#13033
gewarren wants to merge 6 commits into
mainfrom
gewarren-modernize-system-diagnostics-2

Conversation

@gewarren

@gewarren gewarren commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Modernizes the second batch of 60 C# snippets in the System.Diagnostics namespace so they use current C# syntax while preserving the documented APIs and runtime behavior.

Updates 46 .NET 10 snippet projects and adds four consolidation entry points for directories containing multiple samples. All affected projects build successfully; remaining warnings are expected Windows-platform annotations for EventLog and performance-counter APIs.


Internal previews

Toggle expand/collapse
File Preview link
snippets/csharp/System.Diagnostics/EventLog/Overview/source.cs Learn preview
snippets/csharp/System.Diagnostics/EventLog/Source/source.cs Learn preview
snippets/csharp/System.Diagnostics/EventLog/WriteEntry/eventlog_writeentry_1_3.cs Learn preview
snippets/csharp/System.Diagnostics/EventLog/WriteEntry/eventlog_writeentry_4.cs Learn preview
snippets/csharp/System.Diagnostics/EventLog/WriteEntry/eventlog_writeentry_5.cs Learn preview
snippets/csharp/System.Diagnostics/EventLog/WriteEntry/source.cs Learn preview
snippets/csharp/System.Diagnostics/EventLog/WriteEntry/source1.cs Learn preview
snippets/csharp/System.Diagnostics/EventLog/WriteEntry/source2.cs Learn preview
snippets/csharp/System.Diagnostics/EventLogEntry/Overview/eventlogentry_source.cs Learn preview
snippets/csharp/System.Diagnostics/EventLogEntryCollection/Count/eventlogentry_item.cs Learn preview
snippets/csharp/System.Diagnostics/EventLogEntryCollection/Overview/eventlogentry_copyto.cs Learn preview
snippets/csharp/System.Diagnostics/EventLogEntryType/Overview/eventlogentrytype_6.cs Learn preview
snippets/csharp/System.Diagnostics/EventLogTraceListener/Overview/source.cs Learn preview
snippets/csharp/System.Diagnostics/EventSourceCreationData/Overview/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/Comments/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/CompanyName/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/FileBuildPart/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/FileDescription/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/FileMajorPart/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/FileMinorPart/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/FileName/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/FilePrivatePart/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/InternalName/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/IsDebug/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/IsPatched/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/IsPreRelease/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/IsPrivateBuild/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/IsSpecialBuild/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/LegalCopyright/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/LegalTrademarks/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/OriginalFilename/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/Overview/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/PrivateBuild/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductBuildPart/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductMajorPart/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductMinorPart/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductName/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductPrivatePart/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductVersion/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/SpecialBuild/source.cs Learn preview
snippets/csharp/System.Diagnostics/FileVersionInfo/ToString/source.cs Learn preview
snippets/csharp/System.Diagnostics/InstanceData/Overview/instdatacopyto.cs Learn preview
snippets/csharp/System.Diagnostics/InstanceDataCollection/Contains/instdatacolitemcontains.cs Learn preview
snippets/csharp/System.Diagnostics/InstanceDataCollection/Overview/instdatakeysvalues.cs Learn preview
snippets/csharp/System.Diagnostics/InstanceDataCollectionCollection/Contains/instdatacolcolitermcontains.cs Learn preview
snippets/csharp/System.Diagnostics/PerformanceCounter/.ctor/perfcounter.cs Learn preview
snippets/csharp/System.Diagnostics/PerformanceCounter/NextValue/elapsedtime.cs Learn preview
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/.ctor/perfcountercatctor.cs Learn preview
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/.ctor/perfCounterCatDelete.cs Learn preview
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/.ctor/perfCounterCatProps.cs Learn preview

Note

This table shows the first 50 preview links (sorted alphabetically by file path) found in the OPS build report. For the full list, select OpenPublishing.Build Details within checks.

Build report

Update the second batch of 60 System.Diagnostics C# samples to current syntax and consolidate their net10.0 snippet projects while preserving the documented APIs and runtime behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 81f0fa5e-3bcf-4d3b-b652-f7dc76e7ae03
Copilot AI lite review requested due to automatic review settings August 25, 2026 17:05
@gewarren
gewarren requested a review from a team as a code owner August 25, 2026 17:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes a batch of System.Diagnostics C# API-reference snippets to compile cleanly as .NET 10 snippet projects while keeping the demonstrated APIs intact. The updates primarily replace legacy patterns (WinForms scaffolding, older formatting, multiple Main entry points) with current C# syntax and consolidated executable entry points.

Changes:

  • Convert many snippet projects from Library/net10.0-windows to Exe/net10.0, adding consolidation Program.cs entry points where multiple snippet files exist.
  • Modernize snippet code: top-level statements/file-scoped namespaces, string interpolation, target-typed new, using disposal patterns, and removal of unused usings/WinForms scaffolding.
  • Adjust project dependencies to match the APIs used (for example, System.Diagnostics.EventLog for EventLog samples) and prune unnecessary package references.

Reviewed changes

Copilot reviewed 107 out of 110 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/GetCategories/Project.csproj Switch project to Exe/net10.0 for consolidated execution.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/GetCategories/Program.cs Add entry point that runs multiple GetCategories-related snippets.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/GetCategories/perfcountergetcat.cs Modernize formatting, error output, and control flow; MainRun.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/GetCategories/perfcountercatgetinst.cs Modernize code and convert to Run method for consolidation.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/GetCategories/perfcountercatgetcount.cs Modernize code; add disposal of PerformanceCounter instances.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/Create/Project.csproj Switch project to Exe/net10.0 with PerformanceCounter package reference retained.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/Create/program.cs Modernize sample code and add consolidated Program entry point.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/Create/ccd.cs Modernize object/collection initialization; MainRun.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/CounterExists/Project.csproj Switch project to Exe/net10.0 for consolidated execution.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/CounterExists/Program.cs Add entry point that runs multiple CounterExists-related snippets.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/CounterExists/perfcounterobjinstexists.cs Modernize code and convert to Run; remove unused VB dependency.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/CounterExists/perfcountercatstatinstexists.cs Modernize code and convert to Run; remove unused VB dependency.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/CounterExists/perfcountercatstatcounterexists.cs Modernize code and convert to Run; remove unused VB dependency.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/CounterExists/perfcountercatobjexists.cs Modernize code and convert to Run; remove unused VB dependency.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/CounterExists/percounterexists.cs Modernize code and convert to Run; update output formatting.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/.ctor/Project.csproj Switch project to Exe/net10.0 for consolidated execution.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/.ctor/Program.cs Add entry point that runs ctor/props/delete related snippets.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/.ctor/perfCounterCatProps.cs Modernize code and convert to Run; update formatting.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/.ctor/perfCounterCatDelete.cs Modernize code and convert to Run; update output formatting.
snippets/csharp/System.Diagnostics/PerformanceCounterCategory/.ctor/perfcountercatctor.cs Modernize constructor selection logic and convert to Run.
snippets/csharp/System.Diagnostics/PerformanceCounter/NextValue/Project.csproj Switch project to Exe/net10.0.
snippets/csharp/System.Diagnostics/PerformanceCounter/NextValue/elapsedtime.cs Modernize formatting and APIs used; add disposal pattern and explicit types.
snippets/csharp/System.Diagnostics/PerformanceCounter/.ctor/Project.csproj Switch project to Exe/net10.0.
snippets/csharp/System.Diagnostics/PerformanceCounter/.ctor/perfcounter.cs Replace WinForms sample with console/top-level snippet while preserving API usage.
snippets/csharp/System.Diagnostics/InstanceDataCollectionCollection/Contains/Project.csproj Switch project to Exe/net10.0.
snippets/csharp/System.Diagnostics/InstanceDataCollectionCollection/Contains/instdatacolcolitermcontains.cs Modernize formatting and control flow; improve snippet marker placement.
snippets/csharp/System.Diagnostics/InstanceDataCollection/Overview/Project.csproj Switch project to Exe/net10.0.
snippets/csharp/System.Diagnostics/InstanceDataCollection/Overview/instdatakeysvalues.cs Modernize formatting and object creation patterns.
snippets/csharp/System.Diagnostics/InstanceDataCollection/Contains/Project.csproj Switch project to Exe/net10.0.
snippets/csharp/System.Diagnostics/InstanceDataCollection/Contains/instdatacolitemcontains.cs Modernize formatting/control flow; update constants and object creation.
snippets/csharp/System.Diagnostics/InstanceData/Overview/Project.csproj Switch project to Exe/net10.0.
snippets/csharp/System.Diagnostics/InstanceData/Overview/instdatacopyto.cs Modernize formatting and object creation patterns.
snippets/csharp/System.Diagnostics/FileVersionInfo/ToString/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/ToString/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/SpecialBuild/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/SpecialBuild/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductVersion/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductVersion/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductPrivatePart/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductPrivatePart/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductName/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductName/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductMinorPart/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductMinorPart/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductMajorPart/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductMajorPart/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductBuildPart/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/ProductBuildPart/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/PrivateBuild/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/PrivateBuild/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/Overview/source.cs Convert to console/top-level and modernize formatting.
snippets/csharp/System.Diagnostics/FileVersionInfo/Overview/Project.csproj Switch project to Exe/net10.0.
snippets/csharp/System.Diagnostics/FileVersionInfo/OriginalFilename/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/OriginalFilename/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/LegalTrademarks/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/LegalTrademarks/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/LegalCopyright/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/LegalCopyright/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/IsSpecialBuild/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/IsSpecialBuild/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/IsPrivateBuild/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/IsPrivateBuild/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/IsPreRelease/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/IsPreRelease/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/IsPatched/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/IsPatched/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/IsDebug/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/IsDebug/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/InternalName/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/InternalName/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/FilePrivatePart/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/FilePrivatePart/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/FileName/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/FileName/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/FileMinorPart/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/FileMinorPart/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/FileMajorPart/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/FileMajorPart/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/FileDescription/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/FileDescription/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/FileBuildPart/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/FileBuildPart/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/CompanyName/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/CompanyName/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/FileVersionInfo/Comments/source.cs Convert WinForms snippet to console/top-level and modernize path handling.
snippets/csharp/System.Diagnostics/FileVersionInfo/Comments/Project.csproj Switch project to Exe/net10.0; remove unnecessary PerformanceCounter package.
snippets/csharp/System.Diagnostics/EventSourceCreationData/Overview/source.cs Modernize to file-scoped namespace, improve flow and messaging, and add file validation.
snippets/csharp/System.Diagnostics/EventSourceCreationData/Overview/Project.csproj Switch to Exe/net10.0 and use EventLog package reference.
snippets/csharp/System.Diagnostics/EventLogTraceListener/Overview/source.cs Modernize construction/disposal with using declaration.
snippets/csharp/System.Diagnostics/EventLogTraceListener/Overview/Project.csproj Minor whitespace normalization; keep EventLog dependency.
snippets/csharp/System.Diagnostics/EventLogEntryType/Overview/Project.csproj Switch to Exe/net10.0 and use EventLog package reference.
snippets/csharp/System.Diagnostics/EventLogEntryType/Overview/eventlogentrytype_6.cs Modernize to top-level try/catch and updated formatting.
snippets/csharp/System.Diagnostics/EventLogEntryCollection/Overview/Project.csproj Switch to Exe/net10.0 and use EventLog package reference.
snippets/csharp/System.Diagnostics/EventLogEntryCollection/Overview/eventlogentry_copyto.cs Modernize to top-level try/catch and add disposal patterns.
snippets/csharp/System.Diagnostics/EventLogEntryCollection/Count/Project.csproj Switch to Exe/net10.0 and use EventLog package reference.
snippets/csharp/System.Diagnostics/EventLogEntryCollection/Count/eventlogentry_item.cs Modernize to top-level try/catch and add disposal patterns.
snippets/csharp/System.Diagnostics/EventLogEntry/Overview/Project.csproj Switch to Exe/net10.0 and use EventLog package reference.
snippets/csharp/System.Diagnostics/EventLogEntry/Overview/eventlogentry_source.cs Modernize to top-level statements and switch expression.
snippets/csharp/System.Diagnostics/EventLog/WriteEntry/source2.cs Convert MainRun and modernize formatting.
snippets/csharp/System.Diagnostics/EventLog/WriteEntry/source1.cs Convert MainRun, add disposal, and modernize formatting.
snippets/csharp/System.Diagnostics/EventLog/WriteEntry/source.cs Convert MainRun and modernize formatting.
snippets/csharp/System.Diagnostics/EventLog/WriteEntry/Project.csproj Normalize project settings for consolidated Program entry point.
snippets/csharp/System.Diagnostics/EventLog/WriteEntry/Program.cs Add consolidated entry point sequencing multiple WriteEntry samples.
snippets/csharp/System.Diagnostics/EventLog/WriteEntry/eventlog_writeentry_5.cs Convert MainRun and modernize formatting/initializers.
snippets/csharp/System.Diagnostics/EventLog/WriteEntry/eventlog_writeentry_4.cs Convert MainRun and modernize formatting.
snippets/csharp/System.Diagnostics/EventLog/WriteEntry/eventlog_writeentry_1_3.cs Convert MainRun, add disposal, and modernize loops/formatting.
snippets/csharp/System.Diagnostics/EventLog/Source/source.cs Modernize to top-level and add disposal while preserving API usage.
snippets/csharp/System.Diagnostics/EventLog/Source/Project.csproj Minor whitespace normalization; keep EventLog dependency.
snippets/csharp/System.Diagnostics/EventLog/Overview/source.cs Modernize to top-level and add disposal while preserving API usage.
snippets/csharp/System.Diagnostics/EventLog/Overview/Project.csproj Minor whitespace normalization; keep EventLog dependency.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread snippets/csharp/System.Diagnostics/PerformanceCounterCategory/Create/program.cs Outdated
Comment thread snippets/csharp/System.Diagnostics/EventLog/WriteEntry/source.cs Outdated
Comment thread snippets/csharp/System.Diagnostics/EventLog/WriteEntry/eventlog_writeentry_4.cs Outdated
Comment thread snippets/csharp/System.Diagnostics/EventLog/WriteEntry/eventlog_writeentry_5.cs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 107 out of 110 changed files in this pull request and generated 1 comment.

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

snippets/csharp/System.Diagnostics/PerformanceCounterCategory/Create/program.cs:254

  • The new executable entry point invokes only PerfCounter1.Run, even though ccd.cs:5 was also converted from Main to Snippet.Run. This leaves that sample unreachable when the consolidated project is run; include every renamed entry point.
    snippets/csharp/System.Diagnostics/EventLogEntryType/Overview/eventlogentrytype_6.cs:35
  • Correct the spelling of “application” in this user-facing message.
            "then run the applicaton again to use the new event source.");

Comment thread snippets/csharp/System.Diagnostics/EventSourceCreationData/Overview/source.cs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread snippets/csharp/System.Diagnostics/PerformanceCounterCategory/Create/program.cs Outdated
@gewarren gewarren closed this Aug 27, 2026
@gewarren gewarren reopened this Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants