Why does line 16 does not build, but the rest does.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication7
{
class Program
{
public static Boolean functionPicker = true;
static void Main(string[] args)
{
Action func = SomeFunction;
Action funcOther = SomeOtherFunction;
Action chosenFunc = ((functionPicker == true) ? SomeFunction : SomeOtherFunction); //This is line 16
if (functionPicker)
{
chosenFunc = SomeFunction;
}
else
{
chosenFunc = SomeOtherFunction;
}
}
public static void SomeFunction()
{
}
public static void SomeOtherFunction()
{
}
}
}