<?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: Exploring C# Boxing</title>
	<atom:link href="http://www.dijksterhuis.org/exploring-boxing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dijksterhuis.org/exploring-boxing/</link>
	<description>Information, news about programming in C#</description>
	<lastBuildDate>Sat, 04 Jun 2011 10:24:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Elias Krontiris</title>
		<link>http://www.dijksterhuis.org/exploring-boxing/comment-page-1/#comment-10372</link>
		<dc:creator>Elias Krontiris</dc:creator>
		<pubDate>Tue, 10 May 2011 19:15:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=908#comment-10372</guid>
		<description>The same concept can be used on abstract/generic database fields, cool when working with LINQ also. 
At start Linq seemed so strict. Big help!!</description>
		<content:encoded><![CDATA[<p>The same concept can be used on abstract/generic database fields, cool when working with LINQ also.<br />
At start Linq seemed so strict. Big help!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davide</title>
		<link>http://www.dijksterhuis.org/exploring-boxing/comment-page-1/#comment-5437</link>
		<dc:creator>Davide</dc:creator>
		<pubDate>Sun, 09 Jan 2011 11:45:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=908#comment-5437</guid>
		<description>Great article thanks.</description>
		<content:encoded><![CDATA[<p>Great article thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marshall</title>
		<link>http://www.dijksterhuis.org/exploring-boxing/comment-page-1/#comment-5333</link>
		<dc:creator>Marshall</dc:creator>
		<pubDate>Sat, 01 Jan 2011 11:12:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=908#comment-5333</guid>
		<description>Would you mind adding the &quot;download as PDF&quot; Feature to your Articles ! thnx =)</description>
		<content:encoded><![CDATA[<p>Would you mind adding the &#8220;download as PDF&#8221; Feature to your Articles ! thnx =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ranjan</title>
		<link>http://www.dijksterhuis.org/exploring-boxing/comment-page-1/#comment-4791</link>
		<dc:creator>Ranjan</dc:creator>
		<pubDate>Fri, 19 Nov 2010 09:17:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=908#comment-4791</guid>
		<description>By concept of boxing and unboxing was not clear. But this article lead my concept to a clear way.

Thanks</description>
		<content:encoded><![CDATA[<p>By concept of boxing and unboxing was not clear. But this article lead my concept to a clear way.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fiona</title>
		<link>http://www.dijksterhuis.org/exploring-boxing/comment-page-1/#comment-3607</link>
		<dc:creator>fiona</dc:creator>
		<pubDate>Mon, 09 Aug 2010 13:08:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=908#comment-3607</guid>
		<description>thanks so much.i am much more clear with the concepts now than what the lecturer taught me this  morning.</description>
		<content:encoded><![CDATA[<p>thanks so much.i am much more clear with the concepts now than what the lecturer taught me this  morning.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.dijksterhuis.org/exploring-boxing/comment-page-1/#comment-1769</link>
		<dc:creator>John</dc:creator>
		<pubDate>Fri, 18 Dec 2009 19:05:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=908#comment-1769</guid>
		<description>Martijn,

Do you know how to unbox a reference type if you know the type as a variable? I am using reflection to try and write calsses that can create its own SQL statements. On a class I can reflect each member and determine its type, and get its Get function. But the get function Invoke returns an object. How do I unbox it?

Type t = list[i].Type;  // this varibale is correct!
MethodInfo mi = list[i].GetFunction; // this is also correct
var x = (t) mi.Invoke(my_valid_object, null);

The compiler gacks on the &#039;(t)&#039; symbol. This also won&#039;t work:

Type t = list[i].Type;
var x = Activator.CreateInstance(t);

Activator.CreateInstance returns an object, I know it is of type &#039;t&#039; but I cannot cast it that way!

Any ideas?</description>
		<content:encoded><![CDATA[<p>Martijn,</p>
<p>Do you know how to unbox a reference type if you know the type as a variable? I am using reflection to try and write calsses that can create its own SQL statements. On a class I can reflect each member and determine its type, and get its Get function. But the get function Invoke returns an object. How do I unbox it?</p>
<p>Type t = list[i].Type;  // this varibale is correct!<br />
MethodInfo mi = list[i].GetFunction; // this is also correct<br />
var x = (t) mi.Invoke(my_valid_object, null);</p>
<p>The compiler gacks on the &#8216;(t)&#8217; symbol. This also won&#8217;t work:</p>
<p>Type t = list[i].Type;<br />
var x = Activator.CreateInstance(t);</p>
<p>Activator.CreateInstance returns an object, I know it is of type &#8216;t&#8217; but I cannot cast it that way!</p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jordan</title>
		<link>http://www.dijksterhuis.org/exploring-boxing/comment-page-1/#comment-577</link>
		<dc:creator>Jordan</dc:creator>
		<pubDate>Mon, 23 Mar 2009 19:57:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=908#comment-577</guid>
		<description>Marcin,
While I don&#039;t use C# at work or necessarily on a day-to-day basis, I remember Jon Skeet saying (either in his excellent C# in Depth book or on an interview on .NET Rocks!) that the occurrence of casting issues in boxing and unboxing were relatively rare, so it sounds like your experience is quite possibly typical.

Still, I think having strong type-checking is a great added feature, even if it isn&#039;t that common of an issue.

Martijn, this was a very good post. I was directed here from DotNetKicks, and was a little confused about why anyone was still talking about boxing, but your comparison to generics and the table showing the time difference really drove the point home: use generics!</description>
		<content:encoded><![CDATA[<p>Marcin,<br />
While I don&#8217;t use C# at work or necessarily on a day-to-day basis, I remember Jon Skeet saying (either in his excellent C# in Depth book or on an interview on .NET Rocks!) that the occurrence of casting issues in boxing and unboxing were relatively rare, so it sounds like your experience is quite possibly typical.</p>
<p>Still, I think having strong type-checking is a great added feature, even if it isn&#8217;t that common of an issue.</p>
<p>Martijn, this was a very good post. I was directed here from DotNetKicks, and was a little confused about why anyone was still talking about boxing, but your comparison to generics and the table showing the time difference really drove the point home: use generics!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martijn</title>
		<link>http://www.dijksterhuis.org/exploring-boxing/comment-page-1/#comment-563</link>
		<dc:creator>Martijn</dc:creator>
		<pubDate>Mon, 23 Mar 2009 00:04:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=908#comment-563</guid>
		<description>@Marcin

Thanks for the comment ! Just hoping that I am not creating food for job interviews questions with this post ;-)</description>
		<content:encoded><![CDATA[<p>@Marcin</p>
<p>Thanks for the comment ! Just hoping that I am not creating food for job interviews questions with this post <img src='http://www.dijksterhuis.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcin Rybacki</title>
		<link>http://www.dijksterhuis.org/exploring-boxing/comment-page-1/#comment-561</link>
		<dc:creator>Marcin Rybacki</dc:creator>
		<pubDate>Sun, 22 Mar 2009 19:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=908#comment-561</guid>
		<description>Very nice article, I learned a few things from it.... I especially liked the comparison with those two examples

It is good to know such snags or at least to be aware of it... so in case they crop up, the bug wouldn&#039;t make your jaw hanging....

But the other thing is that after a few years of working as a developer I have never had had such issues to trace... so my conclusion is that these kind of snags may most likely appear... on a job interview than on in real life :-)</description>
		<content:encoded><![CDATA[<p>Very nice article, I learned a few things from it&#8230;. I especially liked the comparison with those two examples</p>
<p>It is good to know such snags or at least to be aware of it&#8230; so in case they crop up, the bug wouldn&#8217;t make your jaw hanging&#8230;.</p>
<p>But the other thing is that after a few years of working as a developer I have never had had such issues to trace&#8230; so my conclusion is that these kind of snags may most likely appear&#8230; on a job interview than on in real life <img src='http://www.dijksterhuis.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke R</title>
		<link>http://www.dijksterhuis.org/exploring-boxing/comment-page-1/#comment-557</link>
		<dc:creator>Luke R</dc:creator>
		<pubDate>Sun, 22 Mar 2009 09:22:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=908#comment-557</guid>
		<description>Great article, thanks. Interesting reading :-)</description>
		<content:encoded><![CDATA[<p>Great article, thanks. Interesting reading <img src='http://www.dijksterhuis.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

