<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Parsing XML using XmlSerializer or DataContractSerializer</title>
	<atom:link href="http://www.kongsli.net/nblog/2010/02/01/parsing-xml-using-xmlserializer-or-datacontractserializer/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kongsli.net/nblog/2010/02/01/parsing-xml-using-xmlserializer-or-datacontractserializer/</link>
	<description>Deep thoughts on shallow topics</description>
	<lastBuildDate>Thu, 19 Aug 2010 09:56:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Dave</title>
		<link>http://www.kongsli.net/nblog/2010/02/01/parsing-xml-using-xmlserializer-or-datacontractserializer/comment-page-1/#comment-9621</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Sat, 07 Aug 2010 23:46:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.kongsli.net/nblog/?p=154#comment-9621</guid>
		<description>I&#039;ve been trying to get DataContractSerializer to work on my class, which needs to deserialize private data.  I&#039;ve tried it several ways, including the way you have outlined in your article, but it doesn&#039;t seem to work for me.  When I compile, I get messages for each private property in the class:

Could not find schema information for the element &#039;MyProperty&#039;

And when I run, I get:

Unable to generate a temporary class (result=1).
error CS0200: Property or indexer
&#039;MyProperty&#039; cannot be assigned to -- it is read only

Isn&#039;t that weird?  I seem to read everywhere that I should be able to deserialize data from my XML file and populate the private members of this class, but I haven&#039;t yet found a way to make it work with DataContractSerializer.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been trying to get DataContractSerializer to work on my class, which needs to deserialize private data.  I&#8217;ve tried it several ways, including the way you have outlined in your article, but it doesn&#8217;t seem to work for me.  When I compile, I get messages for each private property in the class:</p>
<p>Could not find schema information for the element &#8216;MyProperty&#8217;</p>
<p>And when I run, I get:</p>
<p>Unable to generate a temporary class (result=1).<br />
error CS0200: Property or indexer<br />
&#8216;MyProperty&#8217; cannot be assigned to &#8212; it is read only</p>
<p>Isn&#8217;t that weird?  I seem to read everywhere that I should be able to deserialize data from my XML file and populate the private members of this class, but I haven&#8217;t yet found a way to make it work with DataContractSerializer.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
