<?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 a Static Method from an Object Instance in C#</title>
	<atom:link href="http://underground.infovark.com/2008/03/28/calling-a-static-method-from-an-object-instance-in-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://underground.infovark.com/2008/03/28/calling-a-static-method-from-an-object-instance-in-c/</link>
	<description>The Infovark technology blog</description>
	<lastBuildDate>Thu, 17 Nov 2011 16:06:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Rajeev</title>
		<link>http://underground.infovark.com/2008/03/28/calling-a-static-method-from-an-object-instance-in-c/comment-page-1/#comment-3271</link>
		<dc:creator>Rajeev</dc:creator>
		<pubDate>Wed, 19 Oct 2011 08:37:12 +0000</pubDate>
		<guid isPermaLink="false">http://underground.infovark.com/?p=11#comment-3271</guid>
		<description>How about this?
ddlVenue.FillValues();


method is defined as:

public static void FillValues(this DropDownList ddl)
{
            ddl.DataValueField = &quot;value&quot;;
            ddl.DataTextField = &quot;test&quot;;
            ddl.DataBind();
}</description>
		<content:encoded><![CDATA[<p>How about this?<br />
ddlVenue.FillValues();</p>
<p>method is defined as:</p>
<p>public static void FillValues(this DropDownList ddl)<br />
{<br />
            ddl.DataValueField = &#8220;value&#8221;;<br />
            ddl.DataTextField = &#8220;test&#8221;;<br />
            ddl.DataBind();<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean</title>
		<link>http://underground.infovark.com/2008/03/28/calling-a-static-method-from-an-object-instance-in-c/comment-page-1/#comment-306</link>
		<dc:creator>Dean</dc:creator>
		<pubDate>Fri, 18 Dec 2009 15:10:38 +0000</pubDate>
		<guid isPermaLink="false">http://underground.infovark.com/?p=11#comment-306</guid>
		<description>Nayak, the article you linked to makes the same point I was making in my comment. Using Invoke() to call a static method won&#039;t give you the expected polymorphic behavior. It will always call the static method on the base class.</description>
		<content:encoded><![CDATA[<p>Nayak, the article you linked to makes the same point I was making in my comment. Using Invoke() to call a static method won&#8217;t give you the expected polymorphic behavior. It will always call the static method on the base class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean</title>
		<link>http://underground.infovark.com/2008/03/28/calling-a-static-method-from-an-object-instance-in-c/comment-page-1/#comment-305</link>
		<dc:creator>Dean</dc:creator>
		<pubDate>Fri, 18 Dec 2009 15:06:23 +0000</pubDate>
		<guid isPermaLink="false">http://underground.infovark.com/?p=11#comment-305</guid>
		<description>Dutt, there&#039;s a good example on using delegates to call static methods in C# on MSDN. Check out Microsoft&#039;s delegates tutorial: http://msdn.microsoft.com/en-us/library/aa288459%28VS.71%29.aspx</description>
		<content:encoded><![CDATA[<p>Dutt, there&#8217;s a good example on using delegates to call static methods in C# on MSDN. Check out Microsoft&#8217;s delegates tutorial: <a href="http://msdn.microsoft.com/en-us/library/aa288459%28VS.71%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/aa288459%28VS.71%29.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nayak</title>
		<link>http://underground.infovark.com/2008/03/28/calling-a-static-method-from-an-object-instance-in-c/comment-page-1/#comment-303</link>
		<dc:creator>nayak</dc:creator>
		<pubDate>Wed, 16 Dec 2009 05:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://underground.infovark.com/?p=11#comment-303</guid>
		<description>short &amp; good explanation, but seems it is controdicting the what says in below articles. just sharing the link incase uses feel useful.

Can static methods be called using object/instance in .NET

http://msdotnetsupport.blogspot.com/2009/12/static-methods-calling-using-object-c.html</description>
		<content:encoded><![CDATA[<p>short &amp; good explanation, but seems it is controdicting the what says in below articles. just sharing the link incase uses feel useful.</p>
<p>Can static methods be called using object/instance in .NET</p>
<p><a href="http://msdotnetsupport.blogspot.com/2009/12/static-methods-calling-using-object-c.html" rel="nofollow">http://msdotnetsupport.blogspot.com/2009/12/static-methods-calling-using-object-c.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dutt</title>
		<link>http://underground.infovark.com/2008/03/28/calling-a-static-method-from-an-object-instance-in-c/comment-page-1/#comment-297</link>
		<dc:creator>Dutt</dc:creator>
		<pubDate>Tue, 15 Dec 2009 08:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://underground.infovark.com/?p=11#comment-297</guid>
		<description>Thanks for this. very nice one.

can you also please provide a sample on using delegates to static methods using object.

Thanks, Dutt</description>
		<content:encoded><![CDATA[<p>Thanks for this. very nice one.</p>
<p>can you also please provide a sample on using delegates to static methods using object.</p>
<p>Thanks, Dutt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean</title>
		<link>http://underground.infovark.com/2008/03/28/calling-a-static-method-from-an-object-instance-in-c/comment-page-1/#comment-15</link>
		<dc:creator>Dean</dc:creator>
		<pubDate>Tue, 06 May 2008 01:37:49 +0000</pubDate>
		<guid isPermaLink="false">http://underground.infovark.com/?p=11#comment-15</guid>
		<description>You&#039;re right Simon. (Did I mention I was being lazy?) The main insight I derived from reading all the articles and comments was that the &quot;static&quot; keyword meant more than I thought it did. In C#, &quot;static&quot; means that the compiler must know -- at compile time -- exactly which method to call. That rules out most polymorphic behavior. It also makes calling static methods from instances problematic. VB.Net doesn&#039;t quibble here, but C# opts for compiler errors.</description>
		<content:encoded><![CDATA[<p>You&#8217;re right Simon. (Did I mention I was being lazy?) The main insight I derived from reading all the articles and comments was that the &#8220;static&#8221; keyword meant more than I thought it did. In C#, &#8220;static&#8221; means that the compiler must know &#8212; at compile time &#8212; exactly which method to call. That rules out most polymorphic behavior. It also makes calling static methods from instances problematic. VB.Net doesn&#8217;t quibble here, but C# opts for compiler errors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://underground.infovark.com/2008/03/28/calling-a-static-method-from-an-object-instance-in-c/comment-page-1/#comment-2</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Sat, 29 Mar 2008 23:48:19 +0000</pubDate>
		<guid isPermaLink="false">http://underground.infovark.com/?p=11#comment-2</guid>
		<description>Those blog links seem to mainly be about calling statics on generic parameters... (rather than just a standard object instance).  Which is indeed annoying, but I&#039;d also say, generally not necessary in a normal design; you&#039;re probably better off using some sort of singleton instance or something.</description>
		<content:encoded><![CDATA[<p>Those blog links seem to mainly be about calling statics on generic parameters&#8230; (rather than just a standard object instance).  Which is indeed annoying, but I&#8217;d also say, generally not necessary in a normal design; you&#8217;re probably better off using some sort of singleton instance or something.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

