# AllocatedEndpoint Methods

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [AllocatedEndpoint](/reference/api/csharp/aspire.hosting/allocatedendpoint.md)
- Kind: `Methods`
- Members: `1`

Represents an endpoint allocated for a service instance.

## ToString

- Name: `ToString`
- Modifiers: `override`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/AllocatedEndpoint.cs#L148)

Returns a string representation of the allocated endpoint URI.

```csharp
public class AllocatedEndpoint
{
    public override string ToString()
    {
        // ...
    }
}
```

## Returns

`string` -- The URI string, [AllocatedEndpoint.UriString](/reference/api/csharp/aspire.hosting/allocatedendpoint/properties.md#uristring).
