Reputation: 1674
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
Upvotes: 5
Views: 4197
Reputation: 1959
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.
Upvotes: 5
Reputation: 6252
Adding a reference to System.Runtime.Serialization
should do the trick.
Upvotes: 10