Re: Overriding Hashtable.Add method
From: Ken Tucker [MVP] (vb2ae_at_bellsouth.net)
Date: 09/20/04
- Next message: FB's .NET Dev PC: "Creating Unidirectional Message-based Named Pipe"
- Previous message: Chris Thunell: "open access95 mdb in vb.net"
- In reply to: John Cobb: "Overriding Hashtable.Add method"
- Next in thread: John Cobb: "Re: Overriding Hashtable.Add method"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 20 Sep 2004 16:31:26 -0400
Hi,
To create a custom collection you inherit from collectionbase.
To create a custom hastable inherit from DictionaryBase.
Ken
---------------
"John Cobb" <john.cobb@acxiom.com> wrote in message
news:OXIaDv0nEHA.3876@TK2MSFTNGP15.phx.gbl...
MSDN and intellisense shows the Add method of Hashtable being overridable
however when I use this code:
Public Class RAL
Inherits Hashtable
Public Overrides Sub Add(ByVal Key As String, ByVal Value As Object)
End Sub
I get the following 2 errors indicating that Add is Overloadable instead of
Overridable:
sub 'Add' cannot be declared 'Overrides' because it does not override a sub
in a base class.
sub 'Add' shadows an overloadable member declared in the base class
'Hashtable'. If you want to overload the base method, this method must be
declared 'Overloads'.
If possible I need to override this. Any suggestions appreciated.
Thanks,
John
- Next message: FB's .NET Dev PC: "Creating Unidirectional Message-based Named Pipe"
- Previous message: Chris Thunell: "open access95 mdb in vb.net"
- In reply to: John Cobb: "Overriding Hashtable.Add method"
- Next in thread: John Cobb: "Re: Overriding Hashtable.Add method"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|