|
回复 linkspeed 5# 帖子
此文章由 dalaohu 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 dalaohu 所有!转贴必须注明作者、出处和本声明,并保持内容完整
This is not overwrite mate, it is called "Hide", it's better written with the "new" keyword
In memory it both pointing to it's own "MethodStatic()"
in your lvl1's sample
it is called
This code that accesses a static member of a type via a type that was derived from it
which is just a bad practice. it only gives you the illusion that this method is from ClassB whereas it belongs to ClassA.
If they from different assembiles, you're actually introduced unneed dependency to ClassB which should be avoided. |
|