My task is to read the environment variables and their values and show them in a listBox. I don't have any problems with getting the variables, but I'm not able to get their values...
Code:
switch (comboBoxRegion.Text)
{
case "Global":
aktenv = new GlobalEnv();
aktGlobal = true;
break;
case "User":
aktenv = new UserEnv();
aktGlobal = false;
break;
FillComboBox();
}
private void FillComboBox()
{
if (aktGlobal)
{
foreach (string var in aktenv.EnumGlobalVars())
{
listBox1.Items.Add(var);
}
}
else
{
foreach (string var in aktenv.EnumUserVars())
{
listBox1.Items.Add(var);
}
}
}
Comment