<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Why does C# always use callvirt? - followup</title><link>http://blogs.msdn.com/ericgu/archive/2008/07/07/why-does-c-always-use-callvirt-followup.aspx</link><description>I was responding in comments, but it doesn't allow me to use links, so here's the long version: Judah, Yes, marking everything as virtual would have little performance impact. It would, however, be a Bad Thing . It's #3 on my list of deadly sins... ShayEr,</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>a-foton &amp;raquo; Why does C# always use callvirt? - followup</title><link>http://blogs.msdn.com/ericgu/archive/2008/07/07/why-does-c-always-use-callvirt-followup.aspx#8703292</link><pubDate>Mon, 07 Jul 2008 21:13:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8703292</guid><dc:creator>a-foton &amp;raquo; Why does C# always use callvirt? - followup</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://blog.a-foton.ru/2008/07/why-does-c-always-use-callvirt-followup/"&gt;http://blog.a-foton.ru/2008/07/why-does-c-always-use-callvirt-followup/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Why does C# always use callvirt? - followup</title><link>http://blogs.msdn.com/ericgu/archive/2008/07/07/why-does-c-always-use-callvirt-followup.aspx#8709038</link><pubDate>Tue, 08 Jul 2008 20:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8709038</guid><dc:creator>Judah</dc:creator><description>&lt;p&gt;It would be a bad thing, eh? Even though it enables mocking of every instance class you create? Man, I have a hard time swallowing that.&lt;/p&gt;
&lt;p&gt;Mocking in Java is easier because methods are virtual by default. C# this is tough -- you can't intercept method calls to non-virtual methods, resulting in sometimes painful unit testing, as mock frameworks can't tell if you've called some method.&lt;/p&gt;
</description></item><item><title>re: Why does C# always use callvirt? - followup</title><link>http://blogs.msdn.com/ericgu/archive/2008/07/07/why-does-c-always-use-callvirt-followup.aspx#8710539</link><pubDate>Wed, 09 Jul 2008 03:36:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8710539</guid><dc:creator>Miral</dc:creator><description>&lt;p&gt;Peripherally related to that is how all sorts of useful things in the .NET framework libraries are marked as private or internal so that they can't be used by outside code. &amp;nbsp;I can understand why, of course, but it's still a bit frustrating at times.&lt;/p&gt;
</description></item></channel></rss>