The purpose of my inherited class is to check for the key before I try to add it to avoid throwing an exception. If the key is already there, the adding is ignored.
On Apr 15, 2:50 am, Cerebrus <[email protected]> wrote: > All dictionaries need to ensure that the key is unique. Else it > wouldn't be a dictionary at all. > > As for the namespace, I've never needed to use it. > > On Apr 13, 10:35 pm, googo man <[email protected]> wrote: > > > > > I didn't include the whole code, but I wanted a dictionary that will > > allow the key to be entered only once. Any attempts to enter it again > > will be ignored. My problem was in the first line of code. > > > On Apr 13, 3:55 am, Cerebrus <[email protected]> wrote: > > > > Nothing per se, I should think except that you don't need to do this > > > if you're using .NET 2+. > > > > Because in that case, why not use a generic dictionary instead? > > > > On Apr 12, 8:03 pm, googo man <[email protected]> wrote: > > > > > Hi, > > > > > What is wrong with this code? > > > > > Imports Microsoft.VisualBasic.Collection > > > > > Public Class MyDictionary > > > > Inherits Dictionary > > > > Public Sub New() > > > > End Sub > > > > > Public Sub New(ByVal TKey As String, ByVal TValue As Char) > > > > > End Sub > > > > End Class- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en or visit the group website at http://megasolutions.net
