惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
Y
Y Combinator Blog
Engineering at Meta
Engineering at Meta
D
Docker
GbyAI
GbyAI
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
腾讯CDC
P
Proofpoint News Feed
A
About on SuperTechFans
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
Google DeepMind News
Google DeepMind News
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
L
LangChain Blog
MyScale Blog
MyScale Blog
博客园 - 三生石上(FineUI控件)
Hugging Face - Blog
Hugging Face - Blog
Microsoft Azure Blog
Microsoft Azure Blog
N
Netflix TechBlog - Medium
G
Google Developers Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

博客园 - 风语者

一些杂项资料 asp.net页面请求实现过程 中国人的成功十要 《.net组件开发第2版》下载 IE7.0(beta)可以下载了 Google Talk中的小秘密 - 风语者 - 博客园 今天的microsoft,明天的google C# 代码标准 .NET2.0版(七)Security 编码指导方针 C# 代码标准 .NET2.0版(六)Remoting 编码指导方针 C# 代码标准 .NET2.0版(五)序列化Serialization 编码指导方针 C# 代码标准 .NET2.0版(四)多线程编码指导方针 C# 代码标准 .NET2.0版(三)项目设置和结构 C# 代码标准 .NET2.0版(二)编码惯例和约定 C# 代码标准 .NET2.0版(一)命名和风格 一些很少用到但还不错的Html功能 - 风语者 - 博客园 常见程序进程(转载) Google提供的好工具 关于Response.ContentType 合并数据记录的问题
今天遇到的一个奇怪的vb.net问题
风语者 · 2005-08-30 · via 博客园 - 风语者

事情是这样的,我写了一个类MyCollection继承自System.Collection.CollectionBase类,CollectionBase类里有方法RemoveAtOnRemove,它们的定义如下:
Public Overridable Sub RemoveAt(   ByVal Index As Integer ) Implements IList.RemoveAt
Protected Overridable Sub OnRemove(  ByVal
index As Integer  ByVal value As Object ) 在我的继承类MyCollection中Overrides了这两个方法
Public Overrides Sub RemoveAt(ByVal index As Integer)
    ......
 End Sub

Protected Overrides Sub OnRemove(index As Integer, value As [Object])
    ......
 End Sub

在编译时方法2没有任何问题,方法1报错  'Public Overrides Sub RemoveAt(index As Integer)' cannot override 'Public Overridable NotOverridable Sub RemoveAt(index As Integer)' because it is declared 'NotOverridable'.
上面的报错信息中基类的RemoveAt的修饰符成了"Overridable NotOverridable",令人费解,这两个修饰符是不应该同时出现的,而且这和基类的定义也不同。
最后将方法1改为
Public Shadows Sub RemoveAt(ByVal index As Integer)
    ......
 End Sub
通过了编译。