GetHashCode

Resource.GetHashCode method

Returns a hash code value for the instance of the Resource class.

public override int GetHashCode()

Return Value

returns a hash code value for this object.

Examples

Shows how to get a hash code of a resource.

var project = new Project(DataDir + "Project.mpp");

var resource1 = project.Resources.GetById(1);
var resource2 = project.Resources.GetById(2);

// the hash code of a resource is equal to resource UID 
Console.WriteLine("Resource UID: {0} Hash Code: {1}", resource1.Get(Rsc.Uid), resource1.GetHashCode());
Console.WriteLine("Resource UID: {0} Hash Code: {1}", resource2.Get(Rsc.Uid), resource2.GetHashCode());

See Also