# 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/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/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.
