Skip to content

Conversation

softwarepronto
Copy link
Contributor

// is referenced by a documentation page for XmlDocument (see below for URLs). When the code copied from the documentation is pasted into a Windows Forms app and the namespaces added, the code does not compile. The compilation error is caused because one method is missing, generateXMLString. There is a copy button on documentation page which copies . I moved generateXMLString from the top of xmlhelpermethods.cs where it is not used into // so it will be included in the example code for the XmlDocument class.

// is referenced by

https://docs.microsoft.com/en-us/dotnet/api/system.xml.xmldocument?view=net-6.0
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Xml/XmlDocument.xml

Here is where snippet 2 is referenced
[!code-csharpXMLProcessingApp#2]

Summary

Describe your changes here.

Fixes #Issue_Number (if available)

//<Snippet2> is referenced by a documentation page for XmlDocument (see below for URLs). When the code copied from the documentation is pasted into a Windows Forms app and the namespaces added, the code does not compile. The compilation error is caused because one method is missing, generateXMLString. There is a copy button on documentation page which copies <Snippet2>. I moved generateXMLString from the top of xmlhelpermethods.cs where it is not used into //<Snippet2> so it will be included in the example code for the XmlDocument class.

//<Snippet2> is referenced by

https://docs.microsoft.com/en-us/dotnet/api/system.xml.xmldocument?view=net-6.0
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Xml/XmlDocument.xml

Here is where snippet 2 is referenced
 [!code-csharp[XMLProcessingApp#2](~/snippets/csharp/System.Xml/XmlDocument/Overview/xmlhelpermethods.cs#2)]
@softwarepronto softwarepronto requested a review from a team as a code owner May 30, 2022 05:47
@dnfadmin
Copy link

dnfadmin commented May 30, 2022

CLA assistant check
All CLA requirements met.

@ghost
Copy link

ghost commented May 30, 2022

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@opbld32
Copy link

opbld32 commented May 30, 2022

Docs Build status updates of commit 38c8e03:

✅ Validation status: passed

File Status Preview URL Details
snippets/csharp/System.Xml/XmlDocument/Overview/xmlhelpermethods.cs ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

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 @softwarepronto

This looks great. I'll :shipit: now.

@BillWagner BillWagner merged commit e149b6b into dotnet:main May 31, 2022
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.

4 participants