<?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: Proceed with Caution: Strongly Typed Resources Ahead</title>
	<atom:link href="http://www.aaronlerch.com/blog/2007/10/14/proceed-with-caution-strongly-typed-resources-ahead/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aaronlerch.com/blog/2007/10/14/proceed-with-caution-strongly-typed-resources-ahead/</link>
	<description></description>
	<lastBuildDate>Thu, 25 Feb 2010 20:23:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: leppie</title>
		<link>http://www.aaronlerch.com/blog/2007/10/14/proceed-with-caution-strongly-typed-resources-ahead/comment-page-1/#comment-213</link>
		<dc:creator>leppie</dc:creator>
		<pubDate>Mon, 22 Oct 2007 07:46:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/10/14/proceed-with-caution-strongly-typed-resources-ahead/#comment-213</guid>
		<description>You are right too! I investigated a bit further. It seems the RuntimeResourceSet (internal class) does not perform any caching, while it&#039;s base class ResourceSet, does cache, which is what you would expect.

Not sure if this a bug, perhaps :)</description>
		<content:encoded><![CDATA[<p>You are right too! I investigated a bit further. It seems the RuntimeResourceSet (internal class) does not perform any caching, while it&#8217;s base class ResourceSet, does cache, which is what you would expect.</p>
<p>Not sure if this a bug, perhaps <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aaron</title>
		<link>http://www.aaronlerch.com/blog/2007/10/14/proceed-with-caution-strongly-typed-resources-ahead/comment-page-1/#comment-212</link>
		<dc:creator>aaron</dc:creator>
		<pubDate>Sat, 20 Oct 2007 02:50:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/10/14/proceed-with-caution-strongly-typed-resources-ahead/#comment-212</guid>
		<description>&lt;p&gt;Thanks leppie&lt;/p&gt;
&lt;p&gt;While what you say is true, your explanation still fails to explain why the following line of code (using my example above) asserts:&lt;br /&gt;
Debug.Assert(Properties.Resources.LockIcon == Properties.Resources.LockIcon);&lt;/p&gt;
&lt;p&gt;The same references are not equal, therefore the same object is not being returned.&lt;/p&gt;
&lt;p&gt;Maybe if the resx file contained the base-64 encoded bits of the image it might return the same instance, but look at the resx file for the particular resource - here&#039;s mine for the example:&lt;br /&gt;
&lt;data name=&quot;LockIcon&quot; type=&quot;System.Resources.ResXFileRef, System.Windows.Forms&quot;&gt;&lt;br /&gt;
  &lt;value&gt;..\Resources\lock16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&lt;/value&gt;&lt;br /&gt;
&lt;/data&gt;&lt;/p&gt;
&lt;p&gt;The ResXFileRef is just a container that uses a TypeConverter to return the appropriate type it points to.&lt;/p&gt;
&lt;p&gt;I don&#039;t have enough time tonight to trace through exactly what&#039;s going on in the ResourceManager (and below) to know what&#039;s happening - it&#039;ll be nice to get my hands on the source when they release it with .NET 3.5! :)&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Thanks leppie</p>
<p>While what you say is true, your explanation still fails to explain why the following line of code (using my example above) asserts:<br />
Debug.Assert(Properties.Resources.LockIcon == Properties.Resources.LockIcon);</p>
<p>The same references are not equal, therefore the same object is not being returned.</p>
<p>Maybe if the resx file contained the base-64 encoded bits of the image it might return the same instance, but look at the resx file for the particular resource &#8211; here&#8217;s mine for the example:<br />
&lt;data name=&#8221;LockIcon&#8221; type=&#8221;System.Resources.ResXFileRef, System.Windows.Forms&#8221;&gt;<br />
  &lt;value&gt;..\Resources\lock16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&lt;/value&gt;<br />
&lt;/data&gt;</p>
<p>The ResXFileRef is just a container that uses a TypeConverter to return the appropriate type it points to.</p>
<p>I don&#8217;t have enough time tonight to trace through exactly what&#8217;s going on in the ResourceManager (and below) to know what&#8217;s happening &#8211; it&#8217;ll be nice to get my hands on the source when they release it with .NET 3.5! <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leppie</title>
		<link>http://www.aaronlerch.com/blog/2007/10/14/proceed-with-caution-strongly-typed-resources-ahead/comment-page-1/#comment-211</link>
		<dc:creator>leppie</dc:creator>
		<pubDate>Fri, 19 Oct 2007 13:35:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/10/14/proceed-with-caution-strongly-typed-resources-ahead/#comment-211</guid>
		<description>The information you are providing is incorrect. The ResourceManager contains a ResourceSet which in turn contains a Hashtable. The Hashtable is populated when a ResourceSet is created. When GetObject is called on the ResourceManager, the already created value will be retrieved from the ResourceSet&#039;s Hashtable, and will NOT be recreated.

This can be clearly seen by looking at the classes in Reflector.</description>
		<content:encoded><![CDATA[<p>The information you are providing is incorrect. The ResourceManager contains a ResourceSet which in turn contains a Hashtable. The Hashtable is populated when a ResourceSet is created. When GetObject is called on the ResourceManager, the already created value will be retrieved from the ResourceSet&#8217;s Hashtable, and will NOT be recreated.</p>
<p>This can be clearly seen by looking at the classes in Reflector.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.aaronlerch.com/blog/2007/10/14/proceed-with-caution-strongly-typed-resources-ahead/comment-page-1/#comment-210</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Thu, 18 Oct 2007 03:58:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/10/14/proceed-with-caution-strongly-typed-resources-ahead/#comment-210</guid>
		<description>Yeah, I really thought those were static resources. That&#039;s pretty bad and non-intuitive like you pointed out.</description>
		<content:encoded><![CDATA[<p>Yeah, I really thought those were static resources. That&#8217;s pretty bad and non-intuitive like you pointed out.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
