title: How to pass a method with optional parameters as an argument?
body: <p>Say, we have <code>ClassA</code> with method <code>Foo</code> containing an optional parameter. So, we can use it as shown in method <code>DoFoo</code>.</p>
  
  <pre><code>public class ClassA
  {
      public ClassA() { }
  
      public void Foo(bool flag = true)
      {
      }
  
      public void DoFoo()
      {
          Foo(); // == Foo(true);
      }
  }
  </code></pre>
  
  <p>Once I needed to pass it to another class <code>ClassB</code>. First I tried to pass it as <code>Action</code>, but the signature surely didn't match. Then I passed it as <code>Action&lt;string&gt;</code>, the signature matched, but the parameter in <code>ClassB</code> was no longer optional. But I did wanted to have it optional and came to an idea to declare a delegate. So, it worked. </p>
  
  <pre><code>public delegate void FooMethod(bool flag = true);
  
  public class ClassB
  {
      Action&lt;bool&gt; Foo1;
      FooMethod Foo2;
  
      public ClassB(Action&lt;bool&gt; _Foo1, FooMethod _Foo2)
      {
          Foo1 = _Foo1;
          Foo2 = _Foo2;
      }
  
      public void DoFoo()
      {
          Foo1(true);
          Foo2(); // == Foo2(true);
      }
  </code></pre>
  
  <p>So, the question is: can I somehow pass a method with an optional parameter as an argument without explicitly declaring a delegate and keep the optional quality of its parameters?</p>