---
title: "member(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nshashtable/member(_:)"
---

# member(_:)

Determines whether the hash table contains a given object, and returns that object if it is present

## Declaration

```swift
func member(_ object: ObjectType?) -> ObjectType?
```

## Parameters

- `object`: The object to test for membership in the hash table.

## Return Value

Return Value If object is a member of the hash table, returns object, otherwise returns nil.

## Discussion

Discussion The equality test used depends on the personality option selected. For instance, choosing the objectPersonality option will use isEqual: to determine equality. See NSPointerFunctions.Options for more information on personality options and their corresponding equality tests.

## See Also

### Accessing Content

- [anyObject](foundation/nshashtable/anyobject.md)
- [allObjects](foundation/nshashtable/allobjects.md)
- [setRepresentation](foundation/nshashtable/setrepresentation.md)
- [count](foundation/nshashtable/count.md)
- [contains(_:)](foundation/nshashtable/contains(_:).md)
- [objectEnumerator()](foundation/nshashtable/objectenumerator().md)
