# ResolvedPort Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ResolvedPort](/reference/api/csharp/aspire.hosting/resolvedport.md)
- Kind: `Properties`
- Members: `3`

Represents a resolved port with information about whether it was allocated or explicitly specified.

## IsAllocated

- Name: `IsAllocated`
- Modifiers: `get; init`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ResolvedPort.cs)

Gets a value indicating whether the port was dynamically allocated. When true, the target environment may choose to ignore this port and use its own allocation mechanism. When false, the port was explicitly specified and should be used as-is.

```csharp
public bool IsAllocated { get; init; }
```

## IsImplicit

- Name: `IsImplicit`
- Modifiers: `get; init`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ResolvedPort.cs)

Gets a value indicating whether the port was implicitly inferred from another value. When true, the port was derived (e.g., exposed port matching target port) rather than explicitly specified by the user.

```csharp
public bool IsImplicit { get; init; }
```

## Value

- Name: `Value`
- Modifiers: `nullable` `get; init`
- Returns: `int?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ResolvedPort.cs)

Gets the port number, or null if no port was resolved.

```csharp
public int? Value { get; init; }
```
