public class Program
{
public static void Main()
bool marker = false;
bool condition = true, condition2 = true;
if (condition)
marker = true;
//do stuff
}
if (marker)
//do other stuff
marker = false;
if (condition2)