# EnvironmentVariableSnapshot Constructors

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

A snapshot of an environment variable.

## EnvironmentVariableSnapshot(string, string?, bool)

- Name: `Constructor(string, string?, bool)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/CustomResourceSnapshot.cs#L193)

A snapshot of an environment variable.

```csharp
public record EnvironmentVariableSnapshot
{
    public EnvironmentVariableSnapshot(
        string Name,
        string? Value,
        bool IsFromSpec)
    {
        // ...
    }
}
```

## Parameters

- `Name` (`string`)
  The name of the environment variable.
- `Value` (`string?`)
  The value of the environment variable.
- `IsFromSpec` (`bool`)
  Determines if this environment variable was defined in the resource explicitly or computed (for e.g. inherited from the process hierarchy).
