Skip to content

Modernize C# code snippets (System.Data) - #13027

Merged
gewarren merged 1 commit into
dotnet:mainfrom
gewarren:modernize-system-data
Aug 24, 2026
Merged

Modernize C# code snippets (System.Data)#13027
gewarren merged 1 commit into
dotnet:mainfrom
gewarren:modernize-system-data

Conversation

Copilot AI lite review requested due to automatic review settings August 24, 2026 15:55
@gewarren
gewarren requested a review from a team as a code owner August 24, 2026 15:55

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

Modernizes selected System.Data C# API documentation snippets with current syntax and formatting.

Changes:

  • Applies target-typed construction, collection expressions, interpolation, and pattern matching.
  • Converts the AsEnumerable sample to top-level statements and an executable project.
  • Corrects the DataColumn array initialization in add1.cs.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
snippets/csharp/System.Data/DataTableExtensions/AsEnumerable/source.cs Modernizes sample structure and syntax.
snippets/csharp/System.Data/DataTableExtensions/AsEnumerable/Project.csproj Configures the sample as an executable.
snippets/csharp/System.Data/DataTable/Overview/source.cs Modernizes formatting and initializers.
snippets/csharp/System.Data/ConstraintCollection/Overview/constraintcollection.cs Modernizes constraints and iteration syntax.
snippets/csharp/System.Data/ConstraintCollection/Add/add4.cs Uses collection expressions and interpolation.
snippets/csharp/System.Data/ConstraintCollection/Add/add3.cs Modernizes formatting and interpolation.
snippets/csharp/System.Data/ConstraintCollection/Add/add2.cs Normalizes formatting.
snippets/csharp/System.Data/ConstraintCollection/Add/add1.cs Corrects column collection initialization.
snippets/csharp/System.Data/ConstraintCollection/Add/add.cs Uses target-typed construction.
snippets/csharp/System.Data/Constraint/ToString/tostring.cs Normalizes formatting.
snippets/csharp/System.Data/Constraint/Table/table.cs Normalizes formatting and braces.
snippets/csharp/System.Data/Constraint/SetDataSet/setdataset.cs Uses target-typed construction.
snippets/csharp/System.Data/Constraint/Overview/constraint.cs Modernizes pattern matching and iteration.
snippets/csharp/System.Data/Constraint/ConstraintName/constraintname.cs Normalizes formatting and naming.

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

@wadepickett wadepickett 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.

@gewarren: Approved. I'm not finding anything beyond what was already addressed. Looks great.

@gewarren
gewarren merged commit 49a16fd into dotnet:main Aug 24, 2026
9 checks passed
@gewarren
gewarren deleted the modernize-system-data branch August 24, 2026 20:39
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