I understand that callbacks are methods it self , and are passed as an argument to another method.
But why do we need to pass method as an argument while we can directly do that just by calling the method.
For Example:
private static void TakeAction(Action<String> action)
{
}
TakeAction((s) => { Console.WriteLine(s); });
The same can be done just by doing:
private static void TakeAction()
{
Fo1();
}
private static void Fo1(string s)
{
Console.WriteLine(s);
}
So why Callback? What specific problem does it address?