var preparatorysteps = new list<action>() { () => console.writeline("reviewing examples of safe practices."), () => console.writeline("learning to not devalue professional advice.") }; foreach(var step in preparatorysteps) { step.invoke(); } var bannedsubstances = new dictionary<string, bool>() { {"substancex", true}, {"substancey", false} }; if(!bannedsubstances.containsvalue(true)) { console.writeline("all substances are approved, no need to restore to the beginning."); } else { console.writeline("identified banned substances, initiating steps to restore to the beginning of the safe medication protocol."); }