public class Foo
{
public Action Bar;
public bool BarEnabled = true;
private void _Bar()
{
if (!BarEnabled) { return; }
// Some code
}
}
public class Foo
{
public Action Bar;
public void BarOn()
{
Bar = _Bar;
}
public void BarOff()
{
Bar = Noop;
}
private void _Bar()
{
// Some code
}
private static void Noop() { }
}
public static void Main();
public static int Main();
public static void Main(string[] args);
public static int Main(string[] args);
public static Task Main();
public static Task<int> Main();
public static Task Main(string[] args);
public static Task<int> Main(string[] args);