隐藏继承类中的属性或方法 [英] hiding properties or methods in inherited class

查看:132
本文介绍了隐藏继承类中的属性或方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想继承列表视图类,但在继承的类中,隐藏

标题样式属性和视图属性(基本上是一个详细列表

with总是可点击的标题)当人们在

IDE中更改其属性时,如何保持继承类中显示的基类属性

?谢谢!

i want to inherit the list view class, but in the inherited class, hide the
Header style property and the view property (basically its a detailed list
with always clickable headers) how do I keep the base class properties from
showing up in the inherited class when people change its properties in the
IDE? thanks!

推荐答案

Hello Smokey,

覆盖(或影子)属性并更改其范围。 (提示:私人

或朋友范围属性不会暴露给公共界面)


-Boo
Hello Smokey,

override (or shadow) the properties and change their scope. (hint: private
or friend scope properties will not be exposed to the public interface)

-Boo

i想要继承列表视图类,但是在继承的类中,

隐藏了Header样式属性和view属性(基本上它是一个

详细列表总是可点击的标题)当人们在IDE中更改其属性时,如何保持基础

类属性不会显示在继承的类中?谢谢!
i want to inherit the list view class, but in the inherited class,
hide the Header style property and the view property (basically its a
detailed list with always clickable headers) how do I keep the base
class properties from showing up in the inherited class when people
change its properties in the IDE? thanks!



我认为你可以更改覆盖的范围限定符,但是

猜阴影是那么,因为它确实允许更改

范围限定符,我是否正确思考?


GhostInAK < gh ******* @ gmail.com写信息

新闻:%2 **************** @ TK2MSFTNGP05.phx.gbl ...
I thought you coudnt change the scope qualifier of an override though, I
guess shadows is the way to go then since it does allow changing of the
scope qualifier, am I thinking correctly?

"GhostInAK" <gh*******@gmail.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...

Hello Smokey,

覆盖(或影子)属性并更改其范围。 (提示:

私人或朋友范围属性不会向公众公开

界面)


-Boo
Hello Smokey,

override (or shadow) the properties and change their scope. (hint:
private or friend scope properties will not be exposed to the public
interface)

-Boo

>我想继承列表视图类,但在继承的类中,
隐藏了Header样式属性和view属性(基本上是它的一个
具有始终可点击标题的详细列表)当人们在IDE中更改其属性时,如何使基础类属性不会显示在继承的类中?谢谢!
>i want to inherit the list view class, but in the inherited class,
hide the Header style property and the view property (basically its a
detailed list with always clickable headers) how do I keep the base
class properties from showing up in the inherited class when people
change its properties in the IDE? thanks!




" Smokey Grindle" < no **** @ dontspamme.comschrieb:
"Smokey Grindle" <no****@dontspamme.comschrieb:

>我想继承列表视图类,但在继承的类中,隐藏
标题样式属性和视图属性(基本上是一个详细的列表,带有始终可点击的标题)当人们在<更改其属性时,如何保持基类属性不会显示在继承的类中? IDE?谢谢!
>i want to inherit the list view class, but in the inherited class, hide the
Header style property and the view property (basically its a detailed list
with always clickable headers) how do I keep the base class properties from
showing up in the inherited class when people change its properties in the
IDE? thanks!



覆盖它们并设置适当的''Browsable''和''EditorBrowsable''

属性。

-

MS Herfried K. Wagner

MVP< URL:http://dotnet.mvps.org/>

VB< URL:http://classicvb.org/petition/>

Override them and set the appropriate ''Browsable'' and ''EditorBrowsable''
attributes.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


这篇关于隐藏继承类中的属性或方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆