- Home /
Question by
Ochreous · Dec 21, 2012 at 04:56 AM ·
c#serializationstrings
Serializing strings to XML C#
Hi Everyone, I'm trying to serialize some strings to XML. But I keep getting this error int does not contain a definition for ExampleString and no extension method for ExampleString. I think this has to do with the fact that the string don't hold values. How do I fix this?
Comment
Best Answer
Answer by Azound · Dec 21, 2012 at 06:00 AM
Can you please post the code that is erroring?
It sounds like you're trying to call a method called ExampleString on an integer. Something like:
42.ExampleString();
Perhaps you pasted some code you found on the internet that had line numbers?
Yes you are correct. I didn't realize it but I did have it go through and integer.