GetHashCode Method

Uri.GetHashCode Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the hash code for the URI.

Namespace:  System
Assembly:  System (in System.dll)

'Declaration
Public Overrides Function GetHashCode As Integer

Return Value

Type: System.Int32
An Int32 containing the hash value generated for this URI.

The following example creates a Uri instance and writes the hash code to the console.


' Create Uri
Dim uriAddress1 As Uri = New Uri("http://www.contoso.com/index.htm#search")
outputBlock.Text &= uriAddress1.Fragment
outputBlock.Text &= vbCrLf

outputBlock.Text &= "Hash code: "
outputBlock.Text &= uriAddress1.GetHashCode()
outputBlock.Text &= vbCrLf


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft