Question

I am in total confusion. I am learning to use DataContractSerializer class by following the example and my compiler keeps saying that it doesn't exist. Isn't DataContractSerializer in System.Runtime.Serialization namespace? Or do you also have to include the reference to the namespace in your project along with its uses clause?

Here is the code:

var theSerial := new DataContractSerializer(typeof(sb));

sb is a record.

Thanks in advance,

Was it helpful?

Solution

I figured out the problem. Yes, you do need to add reference to System.Runtime.Serialization not just under uses clause apparently.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top