I have some VB.NET code that I am converting to C#. It uses XmlDictionaryWriter
and XmlDictionaryReaderQuotas both of which, according to MSDN are in System.Xml and in the assembly System.Runtime.Serialization
. I added System.Runtime.Serialization
as a reference. It keeps saying they cannot be found. Here is the VB.NET code:
Dim xmlreader As System.Xml.XmlDictionaryReader
Dim quotas As New System.Xml.XmlDictionaryReaderQuotas
xmlreader = JsonReaderWriterFactory.CreateJsonReader(result, quotas)
This is in VS2013/.NET Framework 4
Adding a reference to System.Runtime.Serialization
should do the trick.
Right click on your References folder under Project and add Reference, left side under Assembly click Framework then right side search box type System.Runtime.Serialization, check the check box and click add. It should get add into your project. In .cs file add using System.Runtime.Serialization should solve your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With