<?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"
	>
<channel>
	<title>Comments on: Sending Data over UDP using UdpClient</title>
	<atom:link href="http://devblog.antongochev.net/2008/07/04/sending-data-over-udp-using-udpclient/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.antongochev.net/2008/07/04/sending-data-over-udp-using-udpclient/</link>
	<description>Programming is an art...</description>
	<pubDate>Mon, 21 May 2012 05:55:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: ganton</title>
		<link>http://devblog.antongochev.net/2008/07/04/sending-data-over-udp-using-udpclient/#comment-233</link>
		<dc:creator>ganton</dc:creator>
		<pubDate>Tue, 17 Mar 2009 14:23:52 +0000</pubDate>
		<guid isPermaLink="false">http://ganton.wordpress.com/?p=36#comment-233</guid>
		<description>Hi tynar,

The example uses BinaryFormatter class which requires the exact match of the serialized type, its namespace and the assembly where it is compiled. 

If you have two classes in one assembly but under different namespaces you will get InvalidCastException after deserialization. In your case I guess you have your class (let's say Contact) declared in both sender.exe and receiver.exe. In this case you will get SerializationException during deserialization. 

I can offer you to extract the Contact class into a separated assembly and to reference it in both sender.exe and receiver.exe. Then you can try the code again.

Rgards,
Anton</description>
		<content:encoded><![CDATA[<p>Hi tynar,</p>
<p>The example uses BinaryFormatter class which requires the exact match of the serialized type, its namespace and the assembly where it is compiled. </p>
<p>If you have two classes in one assembly but under different namespaces you will get InvalidCastException after deserialization. In your case I guess you have your class (let&#8217;s say Contact) declared in both sender.exe and receiver.exe. In this case you will get SerializationException during deserialization. </p>
<p>I can offer you to extract the Contact class into a separated assembly and to reference it in both sender.exe and receiver.exe. Then you can try the code again.</p>
<p>Rgards,<br />
Anton</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tynar</title>
		<link>http://devblog.antongochev.net/2008/07/04/sending-data-over-udp-using-udpclient/#comment-232</link>
		<dc:creator>tynar</dc:creator>
		<pubDate>Tue, 17 Mar 2009 13:02:12 +0000</pubDate>
		<guid isPermaLink="false">http://ganton.wordpress.com/?p=36#comment-232</guid>
		<description>I tried this example, but I get SerializationException on deserializing. I have built two projects inside one solution, and compiled as sender.exe and receiver.exe. Could it be the Namespace issue?</description>
		<content:encoded><![CDATA[<p>I tried this example, but I get SerializationException on deserializing. I have built two projects inside one solution, and compiled as sender.exe and receiver.exe. Could it be the Namespace issue?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

