[英]Hide some inherited methods from intellisense
我創建了一個UserControl。 讓我們想象一下代碼:
public class MyUserControl : UserControl
{
Button button1;
Button button2;
//...
}
使用該UserControl,我可以單擊其中一個按鈕,這會引發一些事件( Button1Clicked
, Button2Clicked
)。
現在有了UserControl,還有一些其他事件,但是我從不使用過MouseMove
或Dragging( DragEnter
, DragLeave
, DragOver
,...)之類的事件。 Intellisense顯示了大量事件,這些事件在我的UserControl中沒有用。
有隱藏這些繼承事件的通用方法嗎? 我的主要原因是智能感知,也有文檔(XML摘要)。
正如評論所揭示的:不,沒有辦法隱藏Intellisense的繼承事件。
這可能也是一個錯誤的決定。 如果有辦法,在實現時忘記取消隱藏該怎么辦? 沒有人會看到這種方法,但是它會在那里,如果您鍵入它,它將起作用。 那有點奇怪。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.