Is it possible to declare a method as a parameter in C#?
<p>For example the main method I want to call is this:</p>

<pre><code>public static void MasterMethod(string Input){
    /*Do some big operation*/
}
</code></pre>

<p>Usually, I would do something like this this:</p>

<pre><code>public static void StringSelection(int a)
{
    if(a == 1)
    {
       return "if";
    }
    else
    {
       return "else";
    }
}

MasterMethod(StringSelection(2));
</code></pre>

<p>But I want to do something like this:</p>

<pre><code>MasterMethod( a = 2
     {
        if(a == 1)
        {
           return "if";
        }
        else
        {
           return "else";
        }
     });
</code></pre>

<p>Where 2 is somehow passed into the operation as an input.  </p>

<p>Is this possible?  Does this have a name?  </p>

<p>EDIT::  Please note, the MasterMethod is an API call.  I cannot change the parameters for it.  I accidentally made a typo on this.  </p>
