public void SwitchAtt(Mode mode) { switch (mode) { case Mode.HeightOn: foreach (Messpunkt MP in ls_MP) { MP.HeightVisible(true); } break; case Mode.HeightOff: foreach (Messpunkt MP in ls_MP) { MP.HeightVisible(false); } break; default: break; } }