<?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>
	《深入了解.NET中继承和多态（上）》的评论	</title>
	<atom:link href="https://www.ccarea.cn/archives/330/feed" rel="self" type="application/rss+xml" />
	<link>https://www.ccarea.cn/archives/330</link>
	<description>天地定位，山泽通气，雷风相薄，水火不相射，八卦相错。数往者顺，知来者逆，是故《易》逆数也。</description>
	<lastBuildDate>Sun, 02 Sep 2018 07:05:14 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.2</generator>
	<item>
		<title>
		评论者：cc_net		</title>
		<link>https://www.ccarea.cn/archives/330#comment-4210</link>

		<dc:creator><![CDATA[cc_net]]></dc:creator>
		<pubDate>Wed, 14 Sep 2011 22:19:37 +0000</pubDate>
		<guid isPermaLink="false">https://blog.csdn.net/cc_net/article/details/2955771#comment-4210</guid>

					<description><![CDATA[回复：zhvsby 
呵呵，你可以继续看后面2篇关于多态的文章。看完了应该就明白了。CoreCpu继承与IntelCpu ，所以会继承IntelCpu 的虚方法表，而Fun是虚方法，所以CoreCpu实际拥有2个Fun方法。一个是继承的，一个是自己new的。

Cpu c3 = new CoreCpu();
c3.fun(); 
在IL编译时，Cpu这个类型的fun方法是虚方法，所以编译出的fun3的地址是：方法表地址+方法偏移。运行时发现实际对象是CoreCpu，所以会找到CoreCpu对象的方法表，方法偏移指向的是继承的那个fun方法，而不是自己new的。

详细的解释还是看第2篇。]]></description>
			<content:encoded><![CDATA[<p>回复：zhvsby<br />
呵呵，你可以继续看后面2篇关于多态的文章。看完了应该就明白了。CoreCpu继承与IntelCpu ，所以会继承IntelCpu 的虚方法表，而Fun是虚方法，所以CoreCpu实际拥有2个Fun方法。一个是继承的，一个是自己new的。</p>
<p>Cpu c3 = new CoreCpu();<br />
c3.fun();<br />
在IL编译时，Cpu这个类型的fun方法是虚方法，所以编译出的fun3的地址是：方法表地址+方法偏移。运行时发现实际对象是CoreCpu，所以会找到CoreCpu对象的方法表，方法偏移指向的是继承的那个fun方法，而不是自己new的。</p>
<p>详细的解释还是看第2篇。		</p>
<div class="wpulike wpulike-default ">
<div class="wp_ulike_general_class wp_ulike_is_not_liked"><button type="button"
					aria-label="Like Button"
					data-ulike-id="4210"
					data-ulike-nonce="8fea925ea6"
					data-ulike-type="comment"
					data-ulike-template="wpulike-default"
					data-ulike-display-likers="0"
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_comment_btn_4210"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="0"></span>			</div>
</div>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		评论者：zhvsby		</title>
		<link>https://www.ccarea.cn/archives/330#comment-4209</link>

		<dc:creator><![CDATA[zhvsby]]></dc:creator>
		<pubDate>Sun, 11 Sep 2011 22:52:08 +0000</pubDate>
		<guid isPermaLink="false">https://blog.csdn.net/cc_net/article/details/2955771#comment-4209</guid>

					<description><![CDATA[不错 可以咨询个问题么。CoreCpu : IntelCpu   里的Fun是如何做的 ，因为InterCpu里的fun 已经override了。对于实例化 Cpu c3 = new CoreCpu();
            c3.fun(); 
我始终认为应该是做的Cpu 里的fun  但是结果却是InterlCpu里面的。为何啊？难道是CoreCpu继承了interCpu的缘故么？恳请赐教。]]></description>
			<content:encoded><![CDATA[<p>不错 可以咨询个问题么。CoreCpu : IntelCpu   里的Fun是如何做的 ，因为InterCpu里的fun 已经override了。对于实例化 Cpu c3 = new CoreCpu();<br />
            c3.fun();<br />
我始终认为应该是做的Cpu 里的fun  但是结果却是InterlCpu里面的。为何啊？难道是CoreCpu继承了interCpu的缘故么？恳请赐教。		</p>
<div class="wpulike wpulike-default ">
<div class="wp_ulike_general_class wp_ulike_is_not_liked"><button type="button"
					aria-label="Like Button"
					data-ulike-id="4209"
					data-ulike-nonce="af71007d10"
					data-ulike-type="comment"
					data-ulike-template="wpulike-default"
					data-ulike-display-likers="0"
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_comment_btn_4209"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="0"></span>			</div>
</div>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		评论者：ljzforever		</title>
		<link>https://www.ccarea.cn/archives/330#comment-4211</link>

		<dc:creator><![CDATA[ljzforever]]></dc:creator>
		<pubDate>Sun, 17 Oct 2010 04:36:05 +0000</pubDate>
		<guid isPermaLink="false">https://blog.csdn.net/cc_net/article/details/2955771#comment-4211</guid>

					<description><![CDATA[NB的内容，支持啦！]]></description>
			<content:encoded><![CDATA[<p>NB的内容，支持啦！		</p>
<div class="wpulike wpulike-default ">
<div class="wp_ulike_general_class wp_ulike_is_not_liked"><button type="button"
					aria-label="Like Button"
					data-ulike-id="4211"
					data-ulike-nonce="1e123cf190"
					data-ulike-type="comment"
					data-ulike-template="wpulike-default"
					data-ulike-display-likers="0"
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_comment_btn_4211"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="0"></span>			</div>
</div>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
