Skip to content

Document ShouldSerialize and Specified patterns in XmlSerializer (Fixes #50596) - #56659

Open
Manish-1kumar wants to merge 1 commit into
dotnet:mainfrom
Manish-1kumar:users/manish/issue-50596-xmlserializer-shouldserialize
Open

Manish-1kumar wants to merge 1 commit into
dotnet:mainfrom
Manish-1kumar:users/manish/issue-50596-xmlserializer-shouldserialize

Conversation

@Manish-1kumar

Copy link
Copy Markdown
Contributor

Fixes #50596

Summary of Changes

  • Adds a new Conditionally serializing members section to \docs/standard/serialization/controlling-xml-serialization-using-attributes.md.
  • Documents the \ShouldSerialize{PropertyName}()\ method pattern with C# and Visual Basic code examples, emphasizing that the method must have \public\ visibility to be recognized by \XmlSerializer.
  • Documents the companion {PropertyName}Specified\ pattern for non-nullable value types and notes its integration with \xsd.exe\ generated code.

@dotnetrepoman dotnetrepoman Bot added this to the November 2026 milestone Nov 1, 2026
@dotnet-policy-service dotnet-policy-service Bot added dotnet-fundamentals/svc community-contribution Indicates PR is created by someone from the .NET community. labels Nov 1, 2026
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. dotnet-fundamentals/svc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

no decription about ShouldSerialize* pattern use in XmlSerializer

1 participant