---
title: "CFArrayGetValueAtIndex(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfarraygetvalueatindex(_:_:)"
---

# CFArrayGetValueAtIndex(_:_:)

Retrieves a value at a given index.

## Declaration

```swift
func CFArrayGetValueAtIndex(_ theArray: CFArray!, _ idx: CFIndex) -> UnsafeRawPointer!
```

## Parameters

- `theArray`: The array to examine.
- `idx`: The index of the value to retrieve. If the index is outside the index space of theArray (0 to N-1 inclusive (where N is the count of theArray), the behavior is undefined.

## Return Value

Return Value The value at the idx index in theArray. If the return value is a Core Foundation Object, ownership follows The Get Rule.

## See Also

### Examining an Array

- [CFArrayBSearchValues(_:_:_:_:_:)](corefoundation/cfarraybsearchvalues(_:_:_:_:_:).md)
- [CFArrayContainsValue(_:_:_:)](corefoundation/cfarraycontainsvalue(_:_:_:).md)
- [CFArrayGetCount(_:)](corefoundation/cfarraygetcount(_:).md)
- [CFArrayGetCountOfValue(_:_:_:)](corefoundation/cfarraygetcountofvalue(_:_:_:).md)
- [CFArrayGetFirstIndexOfValue(_:_:_:)](corefoundation/cfarraygetfirstindexofvalue(_:_:_:).md)
- [CFArrayGetLastIndexOfValue(_:_:_:)](corefoundation/cfarraygetlastindexofvalue(_:_:_:).md)
- [CFArrayGetValues(_:_:_:)](corefoundation/cfarraygetvalues(_:_:_:).md)
