Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.

GetEnumerator method

Project: Environment Variables Unit

Unit: PJEnvVars

Class: TPJEnvVars

Applies to: ~>3.0

function GetEnumerator: TPJEnvVarsEnumerator;

⚠️ TPJEnvVars has been deprecated. Use TPJEnvVarsEnumerator instances directly or use TPJEnvironmentVars.EnumNames static method instead.


Creates and returns a new enumerator of all environment variable names in the current process.


When compiled with Delphi 2005 and this method enables a TPJEnvVars component instance to be used in a for..in loop.

Important: Environment variables should not be modified while the enumerator is executing (e.g. in a for..in loop).