---
title: "subscript(_:)"
framework: xpc
role: symbol
role_heading: Instance Subscript
path: "xpc/xpcarray/subscript(_:)-9c21w"
---

# subscript(_:)

Get or set a value in this array as a file descriptor.

## Declaration

```swift
subscript(index: Int) -> FileDescriptor? { get set }
```

## Parameters

- `index`: The index at which to get or set the file descriptor.

## Return Value

Return Value A file descriptor value or nil if no such value was found.

## Overview

Overview A file descriptor passed in will be duplicated so the caller must still close theirs. A returned file descriptor is owned by the caller so it must be closed.
