Skip to content

Conversation

@yasaminashoori
Copy link
Contributor

@yasaminashoori yasaminashoori commented Dec 25, 2025

Hi 🌹 thanks for your great works.

Summary

Fixed the code in the CLS compliance documentation where the private field was incorrectly changed to Int16.

The documentation states:

"You don't have to change the type of the private personAge field."

However, the code example in public2.cs showed both the private and public members changed to Int16, which contradicts the documentation.

Fix

Changed private Int16 personAge back to private UInt16 personAge .

Fixes issue: #49691

@yasaminashoori yasaminashoori requested review from a team and BillWagner as code owners December 25, 2025 10:07
@dotnetrepoman dotnetrepoman bot added this to the December 2025 milestone Dec 25, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates PR is created by someone from the .NET community. label Dec 25, 2025
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

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

Thanks @yasaminashoori

Once I make one small change so the sample compiles, this is ready to :shipit:

@BillWagner BillWagner enabled auto-merge (squash) January 5, 2026 16:06
@yasaminashoori
Copy link
Contributor Author

yasaminashoori commented Jan 5, 2026

@BillWagner Thanks for the quick review and the fix 🌹Really appreciate it. Looking forward to contributing more!

Update:
Sorry I accidentally closed and reopened the PR which disabled auto-merge.

auto-merge was automatically disabled January 5, 2026 23:06

Pull request was closed

@yasaminashoori yasaminashoori reopened this Jan 5, 2026
@dotnetrepoman dotnetrepoman bot modified the milestones: December 2025, January 2026 Jan 5, 2026
@gewarren gewarren enabled auto-merge (squash) January 6, 2026 21:13
@BillWagner BillWagner disabled auto-merge January 7, 2026 15:11
@BillWagner BillWagner merged commit 5df6866 into dotnet:main Jan 7, 2026
14 of 16 checks passed
@yasaminashoori yasaminashoori deleted the fix/typo-issue-49691 branch January 7, 2026 20:29
gewarren pushed a commit to gewarren/docs that referenced this pull request Jan 8, 2026
* fix typo: keep private field as UInt16 in CLS compliance example

Fixe dotnet#49691

* Update samples/snippets/csharp/VS_Snippets_CLR/conceptual.clscompliant/cs/public2.cs

---------

Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates PR is created by someone from the .NET community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants