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

推荐订阅源

M
MIT News - Artificial intelligence
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
J
Java Code Geeks
G
Google Developers Blog
美团技术团队
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
The Blog of Author Tim Ferriss
月光博客
月光博客
B
Blog
WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
博客园_首页
人人都是产品经理
人人都是产品经理
aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
Jina AI
Jina AI
S
SegmentFault 最新的问题
H
Help Net Security
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
Google DeepMind News
Google DeepMind News

博客园 - 风语者

一些杂项资料 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
通过了编译。