Name

CaseInsensitiveHashCodeProvider

Synopsis

When this object is passed to a Hashtable constructor, it overrides the GetHashCode() method to allow string comparison without regard to case. If you pass an instance of this type into the Hashtable constructor, you should also pass in an instance of CaseInsensitiveComparer to ensure that any comparison operations (such as sorting) are also performed in a case-insensitive fashion.

Public Class CaseInsensitiveHashCodeProvider : Implements IHashCodeProvider
' Public Constructors
   Public Sub New() 
   Public Sub New(
        ByVal culture As System.Globalization.CultureInfo) 
' Public Shared Properties
   Public Shared ReadOnly Property Default As CaseInsensitiveHashCodeProvider  
' Public Instance Methods
   Public Function GetHashCode(
        ByVal obj As Object) As Integer Implements IHashCodeProvider.GetHashCode 
End Class

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.