---
title: "subscript(_:)"
framework: virtualization
role: symbol
role_heading: Instance Subscript
path: "virtualization/vzvirtioconsoleportarray/subscript(_:)"
---

# subscript(_:)

Returns the Virtio console port at the specified index.

## Declaration

```swift
subscript(portIndex: Int) -> VZVirtioConsolePort? { get }
```

## Parameters

- `portIndex`: The index of the port to return, if present.

## Return Value

Return Value A VZVirtioConsolePort port, or nil if the index is outside the bounds of the array.
