Environment Class

This class provides access to the environment variables and provides facilities to specify where to load the underlying AMPL interpreter.

Namespace
ampl
Assemblies
  • AMPL

Syntax

public class Environment : IEnumerable<KeyValuePair<string, string>>, IEnumerable
class ampl.Environment

Methods

GetEnumerator()

Get the enumerator for the map of environment variables

Return type:System.Collections.Generic.IEnumerator<System.Collections.Generic.IEnumerator`1>{System.Collections.Generic.KeyValuePair<System.Collections.Generic.KeyValuePair`2>{System.String<System.String>, System.String<System.String>}}
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
GetEnumerator()

Get the enumerator for the map of environment variables

Return type:System.Collections.IEnumerator
IEnumerator IEnumerable.GetEnumerator()

Properties

ampl.Environment.Item[System.String]

Access and sets values

Arguments:
  • key (System.String) – Environment variable to get or set
Return type:

System.String

Returns:

Its value if present, null otherwise

public string this[string key] { get; set; }