---
title: "property(forKey:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/stream/property(forkey:)"
---

# property(forKey:)

Returns the receiver’s property for a given key.

## Declaration

```swift
func property(forKey key: Stream.PropertyKey) -> Any?
```

## Parameters

- `key`: The key for one of the receiver’s properties. See Constants for a description of the available property-key constants and associated values.

## Return Value

Return Value The receiver’s property for the key key.

## See Also

### Configuring Streams

- [setProperty(_:forKey:)](foundation/stream/setproperty(_:forkey:).md)
- [delegate](foundation/stream/delegate.md)
