I'm trying to understand why this delegate method has no value in the output. I thought it had to be: Value is - 5 Value is - 5
But the result is: Value is - Value is -
Why number "5" is absent is this example?
class Program
{
internal delegate void Feedback(Int32 value);
static void Main(string[] args)
{
Feedback fbChain = null;
Feedback delFeedback = new Feedback(Print);
fbChain += delFeedback;
fbChain += delFeedback;
fbChain.Invoke(5);
}
internal static void Print(Int32 value)
{
Console.WriteLine("Value is - ", value);
}
}