سؤال

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,

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top