473,406 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

CollectionBase BUG???

hi,

does anyone know something about this:
..net documentation says that CollectionBase.RemoveAt(int index) is
virtual method, but when i try to override it i get compiler error:
cannot override inherited member
'System.Collections.CollectionBase.RemoveAt(int)' because it is not
marked virtual, abstract, or override

is this some kind of bug or what?
if this method is not really virtual so what's the point of this class
being abstract? i can override Remove method but cant RemoveAt.
Nov 17 '05 #1
9 1569
SharpCoderMP,

The documentation could be wrong. What you should be overriding is the
OnRemove or the OnRemoveComplete method to provide custom actions to perform
on removal.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"SharpCoderMP" <cs*******@interia.pl.NFSPM> wrote in message
news:Or**************@TK2MSFTNGP09.phx.gbl...
hi,

does anyone know something about this:
.net documentation says that CollectionBase.RemoveAt(int index) is virtual
method, but when i try to override it i get compiler error:
cannot override inherited member
'System.Collections.CollectionBase.RemoveAt(int)' because it is not marked
virtual, abstract, or override

is this some kind of bug or what?
if this method is not really virtual so what's the point of this class
being abstract? i can override Remove method but cant RemoveAt.

Nov 17 '05 #2
thanks for the info.
i put my code inside OnRemove and it did the trick, although wrong
documentation statement run me into some frustration :(
and what's worse this wasn't the first time...

Nicholas Paldino [.NET/C# MVP] wrote:
SharpCoderMP,

The documentation could be wrong. What you should be overriding is the
OnRemove or the OnRemoveComplete method to provide custom actions to perform
on removal.

Hope this helps.

Nov 17 '05 #3
SharpCoderMP,

My general rule is when documentation fails, use Reflector (or in most
cases use Reflector first).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"SharpCoderMP" <cs*******@interia.pl.NFSPM> wrote in message
news:uy**************@TK2MSFTNGP11.phx.gbl...
thanks for the info.
i put my code inside OnRemove and it did the trick, although wrong
documentation statement run me into some frustration :(
and what's worse this wasn't the first time...

Nicholas Paldino [.NET/C# MVP] wrote:
SharpCoderMP,

The documentation could be wrong. What you should be overriding is
the OnRemove or the OnRemoveComplete method to provide custom actions to
perform on removal.

Hope this helps.


Nov 17 '05 #4

"SharpCoderMP" <cs*******@interia.pl.NFSPM> wrote in message
news:uy**************@TK2MSFTNGP11.phx.gbl...
thanks for the info.
i put my code inside OnRemove and it did the trick, although wrong
documentation statement run me into some frustration :(
and what's worse this wasn't the first time...

Agreed, it's frustrating that such errors still exists 4 years after .NET
was released, guess we are just to lazy to click the "Send comments on this
topic" at the bottom of the offending page when we encounter such mistakes.

Willy.

Nov 17 '05 #5
Willy Denoyette [MVP] wrote:
Agreed, it's frustrating that such errors still exists 4 years after .NET
was released, guess we are just to lazy to click the "Send comments on this
topic" at the bottom of the offending page when we encounter such mistakes.


ahem... you know... through that last 2,5 years of coding in c# i never
looked down at the footer in documentation ;] despite lunching sdk
documentation every day... i think i'll just click "Send comments on
this topic." and write a few lines :)
boy - i didn't knew it even existed ;p
Nov 17 '05 #6
SharpCoderMP,

Don't bother with that. Use the MSDN Product Feedback Center:

http://lab.msdn.microsoft.com/produc...k/default.aspx

This is input directly into the bug database at MS, so you can be
assured that it will be documented somewhere (whether or not they fix it,
who knows).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"SharpCoderMP" <cs*******@interia.pl.NFSPM> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Willy Denoyette [MVP] wrote:
Agreed, it's frustrating that such errors still exists 4 years after .NET
was released, guess we are just to lazy to click the "Send comments on
this topic" at the bottom of the offending page when we encounter such
mistakes.


ahem... you know... through that last 2,5 years of coding in c# i never
looked down at the footer in documentation ;] despite lunching sdk
documentation every day... i think i'll just click "Send comments on this
topic." and write a few lines :)
boy - i didn't knew it even existed ;p

Nov 17 '05 #7

"SharpCoderMP" <cs*******@interia.pl.NFSPM> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Willy Denoyette [MVP] wrote:
Agreed, it's frustrating that such errors still exists 4 years after .NET
was released, guess we are just to lazy to click the "Send comments on
this topic" at the bottom of the offending page when we encounter such
mistakes.


ahem... you know... through that last 2,5 years of coding in c# i never
looked down at the footer in documentation ;] despite lunching sdk
documentation every day... i think i'll just click "Send comments on this
topic." and write a few lines :)
boy - i didn't knew it even existed ;p


Hmmm, I said "we are just too lazy" I didn't mean to say YOU are, sorry if
you feel insulted it was by no means my intention.
Note I did clicked the link several times, you'll get a reply from MS when
they correct the MSDN library, so please consult the online msdn docs. when
in doubt.

Willy.
Nov 17 '05 #8
In my experience, product feedback doesn't care about v1.x issues, on the
other hand all issues with documentation I reported through the feedback
link on the page where corrected within a few weeks, it's easy to do you
don't have to type that much you don't have to refer to some ugly url, the
reference to their internal document system is automatically inserted in the
mail subject (ex. - Documentation Feedback (v1.1):
systemcollectionscollectionbase_2.rtf, RemoveAt Method), more you get a
personal reply when it's done, I suggest you try it before you suggest we
shouldn't bother with this.

Willy.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:uI**************@TK2MSFTNGP09.phx.gbl...
SharpCoderMP,

Don't bother with that. Use the MSDN Product Feedback Center:

http://lab.msdn.microsoft.com/produc...k/default.aspx

This is input directly into the bug database at MS, so you can be
assured that it will be documented somewhere (whether or not they fix it,
who knows).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"SharpCoderMP" <cs*******@interia.pl.NFSPM> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Willy Denoyette [MVP] wrote:
Agreed, it's frustrating that such errors still exists 4 years after
.NET was released, guess we are just to lazy to click the "Send comments
on this topic" at the bottom of the offending page when we encounter
such mistakes.


ahem... you know... through that last 2,5 years of coding in c# i never
looked down at the footer in documentation ;] despite lunching sdk
documentation every day... i think i'll just click "Send comments on this
topic." and write a few lines :)
boy - i didn't knew it even existed ;p


Nov 17 '05 #9
:) don't worry. i didn't felt insulted. i was just laughing on myself
when i realised that tere is that feedback link in documentation :)
after all i was looking at it for over two years.

Willy Denoyette [MVP] wrote:
"SharpCoderMP" <cs*******@interia.pl.NFSPM> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Willy Denoyette [MVP] wrote:
Agreed, it's frustrating that such errors still exists 4 years after .NET
was released, guess we are just to lazy to click the "Send comments on
this topic" at the bottom of the offending page when we encounter such
mistakes.


ahem... you know... through that last 2,5 years of coding in c# i never
looked down at the footer in documentation ;] despite lunching sdk
documentation every day... i think i'll just click "Send comments on this
topic." and write a few lines :)
boy - i didn't knew it even existed ;p

Hmmm, I said "we are just too lazy" I didn't mean to say YOU are, sorry if
you feel insulted it was by no means my intention.
Note I did clicked the link several times, you'll get a reply from MS when
they correct the MSDN library, so please consult the online msdn docs. when
in doubt.

Willy.

Nov 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Steve M | last post by:
I have subclassed CollectionBase. I have also implemented GetEnumerator(). I have tried to set the DataSource of a DataGrid to an instance of my subclass. However, the items in the grid are not...
7
by: m. pollack | last post by:
Hi all, I've been using the CollectionBase class to implement a strongly-typed collection, but I have noticed that the RemoveAt method does not seem to call the "On" hook methods (OnRemove,...
2
by: m.pollack | last post by:
Hi all, I have an application which uses a class object that contains a collection. In order to use the PropertyGrid control to expose properties to the user at runtime, I created a...
1
by: alanrn | last post by:
I've implemented a number of strongly-typed collections that inherit from CollectionBase and recently noticed something that I don't fully understand. CollectionBase defines method RemoveAt(). ...
0
by: Mike Pollett | last post by:
Hi, I have used the ISerializable interface before and the code below worked fine. Until I derived it from CollectionBase. The code will still serialize and deserialize the properties in this class...
1
by: Mike Pollett | last post by:
Hi, I have used the ISerializable interface before and the code below worked fine. Until I derived it from CollectionBase. The code will still serialize and deserialize the properties in this class...
5
by: Eric Johannsen | last post by:
I have a simple object that inherits from CollectionBase and overrides the Count property: namespace MyTest { public class CollTest : System.Collections.CollectionBase { public override int...
2
by: Samuel R. Neff | last post by:
What's the advantage of inheriting from CollectionBase as opposed to just implementing IList? It seems that it saves you from having to implement a few properties (Clear, CopyTo, Count,...
0
by: LIJO CHEERAN | last post by:
Hello friends I am trying to study about CollectionBase. I have inherited CollectionBase in the class TheCollection.cs. I am using the “TheCollection. in an aspx page to store objects...
3
by: Tony Johansson | last post by:
Hello! Sorry for opening up this task again. I want to fully understand this List that is return from CollectionBase. According to you is List in CollectionBase implemented something like...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.