<?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: Calling Non-Public Methods</title>
	<atom:link href="http://elegantcode.com/2010/01/28/calling-non-public-methods/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com/2010/01/28/calling-non-public-methods/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=calling-non-public-methods</link>
	<description></description>
	<lastBuildDate>Tue, 07 Feb 2012 23:42:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
	<item>
		<title>By: manuc66</title>
		<link>http://elegantcode.com/2010/01/28/calling-non-public-methods/comment-page-2/#comment-64213</link>
		<dc:creator>manuc66</dc:creator>
		<pubDate>Tue, 23 Aug 2011 18:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2010/01/28/calling-non-public-methods/#comment-64213</guid>
		<description>Interesting, but have you an idea about which one is faster ? And othant advantage other than not using reflection ?</description>
		<content:encoded><![CDATA[<p>Interesting, but have you an idea about which one is faster ? And othant advantage other than not using reflection ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elegant Code &#187; Linfu Duck Typing Part 1 &#8211; Revealing Secrets</title>
		<link>http://elegantcode.com/2010/01/28/calling-non-public-methods/comment-page-2/#comment-56152</link>
		<dc:creator>Elegant Code &#187; Linfu Duck Typing Part 1 &#8211; Revealing Secrets</dc:creator>
		<pubDate>Fri, 16 Apr 2010 19:10:55 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2010/01/28/calling-non-public-methods/#comment-56152</guid>
		<description>[...] order to access and use this private class. An even better and more efficient approach would be to use delegates instead. But there’s also another simple and elegant solution which I briefly mentioned in a [...]</description>
		<content:encoded><![CDATA[<p>[...] order to access and use this private class. An even better and more efficient approach would be to use delegates instead. But there’s also another simple and elegant solution which I briefly mentioned in a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Coding4all</title>
		<link>http://elegantcode.com/2010/01/28/calling-non-public-methods/comment-page-2/#comment-55619</link>
		<dc:creator>Coding4all</dc:creator>
		<pubDate>Tue, 06 Apr 2010 07:23:57 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2010/01/28/calling-non-public-methods/#comment-55619</guid>
		<description>[...] trick for calling private methods using Delegate.CreateDelegate is extremely [...]</description>
		<content:encoded><![CDATA[<p>[...] trick for calling private methods using Delegate.CreateDelegate is extremely [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis "D.C." Dietrich</title>
		<link>http://elegantcode.com/2010/01/28/calling-non-public-methods/comment-page-1/#comment-54008</link>
		<dc:creator>Dennis "D.C." Dietrich</dc:creator>
		<pubDate>Thu, 25 Feb 2010 06:40:08 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2010/01/28/calling-non-public-methods/#comment-54008</guid>
		<description>Interesting. I&#039;ve written an experimental runtime wrapper generator that uses that technique internally to improve performance (requires C# 4.0 though):
http://blogs.msdn.com/ddietric/archive/2010/01/24/d-c-and-the-wrapper-factory.aspx</description>
		<content:encoded><![CDATA[<p>Interesting. I&#8217;ve written an experimental runtime wrapper generator that uses that technique internally to improve performance (requires C# 4.0 though):<br />
<a href="http://blogs.msdn.com/ddietric/archive/2010/01/24/d-c-and-the-wrapper-factory.aspx" rel="nofollow">http://blogs.msdn.com/ddietric/archive/2010/01/24/d-c-and-the-wrapper-factory.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daily links 2010-02-01 &#124; Maxim's blog</title>
		<link>http://elegantcode.com/2010/01/28/calling-non-public-methods/comment-page-1/#comment-53292</link>
		<dc:creator>Daily links 2010-02-01 &#124; Maxim's blog</dc:creator>
		<pubDate>Mon, 01 Feb 2010 22:14:19 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2010/01/28/calling-non-public-methods/#comment-53292</guid>
		<description>[...] Elegant Code: Calling Non-Public Methods Got a library class where method is private, or you need to access this in your unit test? Use .NET reflection [...]</description>
		<content:encoded><![CDATA[<p>[...] Elegant Code: Calling Non-Public Methods Got a library class where method is private, or you need to access this in your unit test? Use .NET reflection [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Look At The Effective Stop Smoking Methods In This NLP Video &#124;</title>
		<link>http://elegantcode.com/2010/01/28/calling-non-public-methods/comment-page-1/#comment-53256</link>
		<dc:creator>Look At The Effective Stop Smoking Methods In This NLP Video &#124;</dc:creator>
		<pubDate>Sat, 30 Jan 2010 22:36:51 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2010/01/28/calling-non-public-methods/#comment-53256</guid>
		<description>[...] Elegant Code » Calling Non-Public Methods [...]</description>
		<content:encoded><![CDATA[<p>[...] Elegant Code » Calling Non-Public Methods [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Quit Smoking Methods &#124;</title>
		<link>http://elegantcode.com/2010/01/28/calling-non-public-methods/comment-page-1/#comment-53246</link>
		<dc:creator>Quit Smoking Methods &#124;</dc:creator>
		<pubDate>Sat, 30 Jan 2010 07:44:21 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2010/01/28/calling-non-public-methods/#comment-53246</guid>
		<description>[...] Elegant Code » Calling Non-Public Methods [...]</description>
		<content:encoded><![CDATA[<p>[...] Elegant Code » Calling Non-Public Methods [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Latest Methods To Quit Smoking Auctions &#124;</title>
		<link>http://elegantcode.com/2010/01/28/calling-non-public-methods/comment-page-1/#comment-53235</link>
		<dc:creator>Latest Methods To Quit Smoking Auctions &#124;</dc:creator>
		<pubDate>Fri, 29 Jan 2010 14:49:27 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2010/01/28/calling-non-public-methods/#comment-53235</guid>
		<description>[...] Elegant Code » Calling Non-Public Methods [...]</description>
		<content:encoded><![CDATA[<p>[...] Elegant Code » Calling Non-Public Methods [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Methods To Quit Smoking Cigarettes.wmv &#124;</title>
		<link>http://elegantcode.com/2010/01/28/calling-non-public-methods/comment-page-1/#comment-53228</link>
		<dc:creator>Methods To Quit Smoking Cigarettes.wmv &#124;</dc:creator>
		<pubDate>Fri, 29 Jan 2010 11:37:56 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2010/01/28/calling-non-public-methods/#comment-53228</guid>
		<description>[...] Elegant Code » Calling Non-Public Methods [...]</description>
		<content:encoded><![CDATA[<p>[...] Elegant Code » Calling Non-Public Methods [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Van Wassenhove</title>
		<link>http://elegantcode.com/2010/01/28/calling-non-public-methods/comment-page-1/#comment-53219</link>
		<dc:creator>Tim Van Wassenhove</dc:creator>
		<pubDate>Fri, 29 Jan 2010 07:47:57 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2010/01/28/calling-non-public-methods/#comment-53219</guid>
		<description>Here is it&#039;s evil sister:

static class Reflector
{
 public static T GetMethod(this object target, string methodName)
 {
  var method = Delegate.CreateDelegate(typeof(T), target, methodName);
  return (T)(object)method;
 }
}

Console.WriteLine(subject.GetMethod&lt;Func&gt;(&quot;DoSomething&quot;)(&quot;hello Freggles&quot;));</description>
		<content:encoded><![CDATA[<p>Here is it&#8217;s evil sister:</p>
<p>static class Reflector<br />
{<br />
 public static T GetMethod(this object target, string methodName)<br />
 {<br />
  var method = Delegate.CreateDelegate(typeof(T), target, methodName);<br />
  return (T)(object)method;<br />
 }<br />
}</p>
<p>Console.WriteLine(subject.GetMethod&lt;Func&gt;(&#8220;DoSomething&#8221;)(&#8220;hello Freggles&#8221;));</p>
]]></content:encoded>
	</item>
</channel>
</rss>

