473,465 Members | 2,123 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Collections - Documentation

I am working with collection so naturally I have a class this is inheriting
from collection base.

The documentation based on .net framework v 1.1 has both Count and
GetEnumerator declared as virtual.

However when I go to override these methods I get the compiler error stating
that I cannot use override because the properties/methods were not declaired
as virtual, override or abstract.

Has anyone else ran into this? Is there a patch for it or am I just up a
creek?

Thanks
Adam dR.
Nov 16 '05 #1
2 1058
Adam Dockter <ad**@cu.net> wrote:
I am working with collection so naturally I have a class this is inheriting
from collection base.

The documentation based on .net framework v 1.1 has both Count and
GetEnumerator declared as virtual.

However when I go to override these methods I get the compiler error stating
that I cannot use override because the properties/methods were not declaired
as virtual, override or abstract.

Has anyone else ran into this? Is there a patch for it or am I just up a
creek?


It's a mistake in the documentation - they're not virtual.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2
Adam,

The Count property is not overridable, even though the documentation
says it is. The same goes for the GetEnumerator method.

If you need to override these, then you should implement the IList
interface from scratch.

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

"Adam Dockter" <ad**@cu.net> wrote in message
news:e7**************@TK2MSFTNGP11.phx.gbl...
I am working with collection so naturally I have a class this is inheriting
from collection base.

The documentation based on .net framework v 1.1 has both Count and
GetEnumerator declared as virtual.

However when I go to override these methods I get the compiler error
stating
that I cannot use override because the properties/methods were not
declaired
as virtual, override or abstract.

Has anyone else ran into this? Is there a patch for it or am I just up a
creek?

Thanks
Adam dR.

Nov 16 '05 #3

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

Similar topics

10
by: Shemp | last post by:
I'm looking for information on what type of collection fits a particular need. For example, what collection provides the best performance for a large volume of records? What collection provides...
5
by: curtis m. west | last post by:
hi NG sorry for this maybe stupid question: i have this construction: ----->>>> CUT ON <<<<<----- Set objFso = Server.CreateObject("Scripting.FileSystemObject") Set objFolder =...
0
by: Gavin | last post by:
I am using collections in my project and have come up against some issues. My project is a web based thin client application. The main issue I have is with collections, I have all the users...
4
by: Roland Hall | last post by:
I have two questions which I am unable to find answers to: 1. What is the difference between Request.Form and Request.Item? I can do this: dim obj, postback, o postback =...
2
by: Rachel Suddeth | last post by:
Every time I read about these things my brain gets muddled and I can't keep them straight. I'm going to give my guesses, could someone confirm or deny? I think a collection doesn't have to be...
3
by: nzanella | last post by:
Hello, I cannot seem to find this in the MSDN documentation: what I would like to ask is whether the System.Collections.Hashtable.Add should throw an exception or replace the old value when an...
2
by: Howard Swope | last post by:
Could someone help explain thread safety issues in the System.Collections classes? The documentation states:...
6
by: Bern McCarty | last post by:
I'm trying to use the VS 2005 March Tech Preview and am trying to adjust some MC++ to the new C++/CLI syntax. I got a little hung up when I encountered the below error. Certainly my...
2
by: newscorrespondent | last post by:
I have a list declared: public System.Collections.Generic.SortedList<int, System.Collections.Generic.List<MTGTracer ActiveList = new SortedList<int,List<MTGTracer>>(); The key is an integer...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.