How to get the hash code of a string in VB.NET

1 Answer

0 votes
Imports System

Public Class Program
	Public Shared Sub Main()
        Dim str1 As String = "C# Software Developer"
        Console.WriteLine(str1.GetHashCode())
		
        Dim str2 As String = "C# Software Developer"
        Console.WriteLine(str2.GetHashCode())
		
        Dim str3 As String = "java c# python"
        Console.WriteLine(str3.GetHashCode())
    End Sub
End Class




' run
'
' -951743161
' -951743161
' -609583809
'

 



answered Aug 5, 2022 by avibootz
...