Click or drag to resize

ExtensionsGetEnhancedHashCode Method

Gets an Enhanced Hash Code for a Uri.

Namespace:  VDS.RDF
Assembly:  dotNetRDF (in dotNetRDF.dll) Version:
public static int GetEnhancedHashCode(
	this Uri u


Type: SystemUri
Uri to get Hash Code for.

Return Value

Type: Int32

[Missing <returns> documentation for "M:VDS.RDF.Extensions.GetEnhancedHashCode(System.Uri)"]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Uri. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
The .Net Uri class Hash Code ignores the Fragment ID when computing the Hash Code which means that URIs with the same basic URI but different Fragment IDs have identical Hash Codes. This is perfectly acceptable and sensible behaviour for normal URI usage since Fragment IDs are only relevant to the Client and not the Server. But in the case of URIs in RDF the Fragment ID is significant and so we need in some circumstances to compute a Hash Code which includes this information.
See Also