# DelegatedSubnetAnnotation Constructors

- Package: [Aspire.Hosting.Azure](/reference/api/csharp/aspire.hosting.azure.md)
- Type: [DelegatedSubnetAnnotation](/reference/api/csharp/aspire.hosting.azure/delegatedsubnetannotation.md)
- Kind: `Constructors`
- Members: `1`

Annotation that stores a reference to a subnet for an Azure resource that implements [IAzureDelegatedSubnetResource](/reference/api/csharp/aspire.hosting.azure/iazuredelegatedsubnetresource.md).

## DelegatedSubnetAnnotation(ReferenceExpression)

- Name: `Constructor(ReferenceExpression)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure/DelegatedSubnetAnnotation.cs#L14-L19)

Annotation that stores a reference to a subnet for an Azure resource that implements [IAzureDelegatedSubnetResource](/reference/api/csharp/aspire.hosting.azure/iazuredelegatedsubnetresource.md).

```csharp
public sealed class DelegatedSubnetAnnotation
{
    public DelegatedSubnetAnnotation(
        ReferenceExpression subnetId)
    {
        // ...
    }
}
```

## Parameters

- `subnetId` (`ReferenceExpression`)
  The subnet ID reference expression.
