---
title: hashValue
framework: swift
role: symbol
role_heading: Instance Property
path: swift/task/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

### Comparing Tasks

- [==(_:_:)](swift/task/==(_:_:).md)
- [!=(_:_:)](swift/task/!=(_:_:).md)
- [hash(into:)](swift/task/hash(into:).md)
