How to use a specific encoding using XDocument in C# and VB.NET

To use a specific encoding when working with XDocument, you can create an XDeclaration.


C# Sample

VB.NET Sample

If you have any questions or suggestions feel free to rate this snippet, post a comment or Contact Us via Email.

Related links:

Leave a Reply