Demonstrating method GetHashCode of class String

Imports System
Public Class MainClass
Shared Sub Main()
Dim string1 As String = "hello"
Dim string2 As String = "Hello"
Dim quotes As Char = ChrW(34)
Console.WriteLine( "The hash code for " & quotes & string1 & _
quotes & " is " & string1.GetHashCode() )
Console.WriteLine( "The hash code for " & quotes & string2 & _
quotes & " is " & string2.GetHashCode() )
End Sub ' Main
End Class
Related examples in the same category