Re: List in collectionbase

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Majed (amjedksa_at_hotmail.com)
Date: 05/17/04


Date: Mon, 17 May 2004 07:45:19 -0700


"Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_MVP@msn.com> wrote in message
news:OkdXlABPEHA.3264@tk2msftngp13.phx.gbl...
> Majed,
> > Public Class NewKeys
> > Inherits BaseCollection
>
> Have you tried inheriting from System.Collection.CollectionBase instead of
> System.Windows.Forms.BaseCollection?
>
> CollectionBase contains a List property for you ready to use, while
> BaseCollection requires you to override the List property and return an
> ArrayList to use.
>
> Overall CollectionBase and other classes from System.Collection &
> System.Collection.Specialized are the classes you should be using...
>
> Hope this helps
> Jay
it sure dose
thanks



Relevant Pages

  • Re: List in collectionbase
    ... >> Public Class NewKeys ... >> Inherits BaseCollection ... > CollectionBase contains a List property for you ready to use, ...
    (microsoft.public.dotnet.general)
  • Re: List in collectionbase
    ... >> Public Class NewKeys ... >> Inherits BaseCollection ... > CollectionBase contains a List property for you ready to use, ...
    (microsoft.public.dotnet.framework)
  • Re: Strange problem withCollectionBase
    ... According to the documentation in CollectionBase for member List it return ... The List property of CollectionBase always returns "this" (i.e. the ... Intellisense is based on the knowledge at compile-time. ...
    (microsoft.public.dotnet.languages.csharp)
  • CollectionBase List property
    ... The doc says that the List property of CollectionBase returns an IList ... int index) which is again of type ... do not have a CopyTo member defined..?? ...
    (microsoft.public.dotnet.languages.csharp)