<?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: C# 3.0 Tutorials: What is Anonymous type?</title>
	<atom:link href="http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types/feed" rel="self" type="application/rss+xml" />
	<link>http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types</link>
	<description>Sharing our knowledge</description>
	<lastBuildDate>Thu, 04 Mar 2010 13:05:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: moshi</title>
		<link>http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types/comment-page-1#comment-170360</link>
		<dc:creator>moshi</dc:creator>
		<pubDate>Sat, 09 May 2009 12:05:14 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types#comment-170360</guid>
		<description>A very good explanation!
You can see it works also in &lt;a href=&quot;http://www.jerusa.co.il/index.aspx?ln=en&quot; rel=&quot;nofollow&quot;&gt;Jerusalem rel estate&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>A very good explanation!<br />
You can see it works also in <a href="http://www.jerusa.co.il/index.aspx?ln=en" rel="nofollow">Jerusalem rel estate</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nishant Rana</title>
		<link>http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types/comment-page-1#comment-85386</link>
		<dc:creator>Nishant Rana</dc:creator>
		<pubDate>Wed, 23 Jul 2008 15:34:56 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types#comment-85386</guid>
		<description>Finally understood anonymous type!!! 
Thanks Michael for such a nice post :)</description>
		<content:encoded><![CDATA[<p>Finally understood anonymous type!!!<br />
Thanks Michael for such a nice post :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sync</title>
		<link>http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types/comment-page-1#comment-72753</link>
		<dc:creator>Michael Sync</dc:creator>
		<pubDate>Wed, 18 Jun 2008 08:53:30 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types#comment-72753</guid>
		<description>Yes. You can&#039;t run the anonymous type. but there are some tricks for that. &lt;a href=&quot;http://tomasp.net/blog/cannot-return-anonymous-type-from-method.aspx&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; is also one of the nice tricks..  but it won&#039;t work for passing the type from one assembly to another. 

so, the safe method would be &quot;creating a class that holds your data&quot; :)</description>
		<content:encoded><![CDATA[<p>Yes. You can&#8217;t run the anonymous type. but there are some tricks for that. <a href="http://tomasp.net/blog/cannot-return-anonymous-type-from-method.aspx" rel="nofollow">this post</a> is also one of the nice tricks..  but it won&#8217;t work for passing the type from one assembly to another. </p>
<p>so, the safe method would be &#8220;creating a class that holds your data&#8221; :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Interresting</title>
		<link>http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types/comment-page-1#comment-72473</link>
		<dc:creator>Interresting</dc:creator>
		<pubDate>Tue, 17 Jun 2008 12:32:59 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types#comment-72473</guid>
		<description>hmmm... yeah. But what if you want to separate the logic so one class has a method to get a list, and onother holds a view to iterate and present the list? for instance something similar to this:

class GirlsController {   

public static var GetGirls(){ 
XDocument xmlSource = XDocument.Load(&quot;Girls.xml&quot;);   
  
var girls = from g in xmlSource.Descendants(&quot;Girl&quot;)   
select new  
{   
Name = g.Element(&quot;Name&quot;).Value,   
DateOfBirth = g.Element(&quot;DateOfBirth&quot;).Value   
};

return girls;
}
}
class GirlsView{
...
var girls = GirlsController.GetGirls

foreach (var girl in girls) {   
Console.WriteLine(&quot;Name: {0}, Date Of Birth: {1}&quot;,   
girl.Name,   
girl.DateOfBirth);   
}
}

it is to my knowledge not possible to return anonymous types, not even in 3.5, or am I missing something? Atm when doing this with LINQ, I have to create a class that holds my data and return that instead :(</description>
		<content:encoded><![CDATA[<p>hmmm&#8230; yeah. But what if you want to separate the logic so one class has a method to get a list, and onother holds a view to iterate and present the list? for instance something similar to this:</p>
<p>class GirlsController {   </p>
<p>public static var GetGirls(){<br />
XDocument xmlSource = XDocument.Load(&#8220;Girls.xml&#8221;);   </p>
<p>var girls = from g in xmlSource.Descendants(&#8220;Girl&#8221;)<br />
select new<br />
{<br />
Name = g.Element(&#8220;Name&#8221;).Value,<br />
DateOfBirth = g.Element(&#8220;DateOfBirth&#8221;).Value<br />
};</p>
<p>return girls;<br />
}<br />
}<br />
class GirlsView{<br />
&#8230;<br />
var girls = GirlsController.GetGirls</p>
<p>foreach (var girl in girls) {<br />
Console.WriteLine(&#8220;Name: {0}, Date Of Birth: {1}&#8221;,<br />
girl.Name,<br />
girl.DateOfBirth);<br />
}<br />
}</p>
<p>it is to my knowledge not possible to return anonymous types, not even in 3.5, or am I missing something? Atm when doing this with LINQ, I have to create a class that holds my data and return that instead :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: C# 3.0 Tutorials: Understanding about Anonymous types</title>
		<link>http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types/comment-page-1#comment-44052</link>
		<dc:creator>C# 3.0 Tutorials: Understanding about Anonymous types</dc:creator>
		<pubDate>Thu, 06 Mar 2008 14:50:33 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types#comment-44052</guid>
		<description>[...] Original post by Michael Sync [...]</description>
		<content:encoded><![CDATA[<p>[...] Original post by Michael Sync [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sync &#187; C# 3.0 Tutorials with Visual Studio 2008 for Beginners</title>
		<link>http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types/comment-page-1#comment-44042</link>
		<dc:creator>Michael Sync &#187; C# 3.0 Tutorials with Visual Studio 2008 for Beginners</dc:creator>
		<pubDate>Thu, 06 Mar 2008 13:51:41 +0000</pubDate>
		<guid isPermaLink="false">http://michaelsync.net/2008/03/06/c-30-tutorials-understanding-about-anonymous-types#comment-44042</guid>
		<description>[...] Anonymous types [...]</description>
		<content:encoded><![CDATA[<p>[...] Anonymous types [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
