# ResourceNameAttribute Constructors

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ResourceNameAttribute](/reference/api/csharp/aspire.hosting/resourcenameattribute.md)
- Kind: `Constructors`
- Members: `1`

Signifies that a parameter represents a resource name.

Decorate `String` parameters representing resource names with this attribute, e.g.:

```csharp
public static IResourceBuilder<MyResource> AddCustomResource(this IDistributedApplicationBuilder builder, [ResourceName] string name)
```

## ResourceNameAttribute

- Name: `Constructor`

```csharp
public sealed class ResourceNameAttribute
{
    public ResourceNameAttribute()
    {
        // ...
    }
}
```
