Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 3, 2025

Summary

Added documentation to the README explaining the #region HIGHLIGHT / #endregion HIGHLIGHT tags used throughout the source code.

Problem

The README had documentation for INCLUDE, EXCLUDE, and // EXCLUDE markers, but was missing documentation for the HIGHLIGHT regions that are used in 236+ files throughout the codebase. Users reading the source code would see these markers without understanding their purpose.

Solution

Added a concise explanation in the "Reading the Source Code" section:

When you see matching #region HIGHLIGHT and #endregion HIGHLIGHT tags within an INCLUDE region, this indicates that the particular code section is emphasized in the book, typically with special formatting or shading to draw attention to the key concept being demonstrated.

This provides readers with the context they need to understand that HIGHLIGHT regions mark code that receives special emphasis in the book, helping them identify the most important parts of each listing.

Example

For instance, in src/Chapter13/Listing13.16.PassingADelegateWithAnExpressionLambda.cs:

#region INCLUDE
//...
#region HIGHLIGHT
DelegateSample.BubbleSort
    (items, (first, second) => first < second);
#endregion HIGHLIGHT
//...
#endregion INCLUDE

Readers now understand that the highlighted lambda expression is the key concept being taught in that particular listing.

Original prompt

There are a lot of:

#region INCLUDE #endregion INCLUDE kinds of things in the code.
work on adding some light and minimal (just enough to understand how to read the source code when you see these) documentation in the readme about those if there isn't already.

The reasoning for it is Basically what you can see in the book is between the "#region INCLUDE" and the "#endregion INCLUDE" minus whatever is between a "#region EXCLUDE" and a "#endregion EXCLUDE" or an line ending in // EXClUDE (or similar , I forget exactly what is used)


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title There are a lot of: #region INCLUDE #endregion INCLUDE kinds of things in the code. work on adding some light and minimal (just enough to understand how to read the source code when you see these) documentation in the readme about those if there isn't... Add documentation for HIGHLIGHT regions in README Oct 3, 2025
@BenjaminMichaelis BenjaminMichaelis marked this pull request as ready for review October 3, 2025 10:13
Copilot AI review requested due to automatic review settings October 3, 2025 10:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds documentation explaining the purpose of #region HIGHLIGHT / #endregion HIGHLIGHT tags used throughout the codebase to help readers understand how to interpret these markers when reading source code.

  • Documents the HIGHLIGHT region markers that are used in 236+ files but were previously undocumented
  • Explains that highlighted regions indicate code emphasized in the book with special formatting
  • Completes the documentation set alongside existing INCLUDE and EXCLUDE marker explanations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@BenjaminMichaelis BenjaminMichaelis merged commit 4714298 into v12.0 Oct 3, 2025
6 checks passed
@BenjaminMichaelis BenjaminMichaelis deleted the copilot/fix-9afe6dd8-b53e-4c8d-af18-c2cfb3349d7e branch October 3, 2025 10:17
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.

2 participants