---
title: hashValue
framework: swift
role: symbol
role_heading: Instance Property
path: swift/int/hashvalue
---

# hashValue

The hash value.

## Declaration

```swift
var hashValue: Int { get }
```

## Discussion

Discussion Hash values are not guaranteed to be equal across different executions of your program. Do not save hash values to use during a future execution. important: hashValue is deprecated as a Hashable requirement. To conform to Hashable, implement the hash(into:) requirement instead. The compiler provides an implementation for hashValue for you.

## See Also

### Infrequently Used Functionality

- [init()](swift/int/init().md)
- [init(integerLiteral:)](swift/int/init(integerliteral:).md)
- [Int.IntegerLiteralType](swift/int/integerliteraltype.md)
- [distance(to:)](swift/int/distance(to:).md)
- [advanced(by:)](swift/int/advanced(by:).md)
- [Int.Stride](swift/int/stride.md)
