am starting to learn use delegates ,but am having a problem to solve this code ,can u help , solve it and say what am doing wrong, thanks.
here is what i did.
namespace DelegateHello
{
class Program
{
public delegate void Hello()
static void Main(string[] args)
{
Hello greetings = null;
Hello g1 = new Hello(Good Morning);
Hello += g1;
Hello g2 = new Hello(Good Evening)
Hello += g2;
}
public static void Goodmorning()
{
Console.WriteLine(" Good Morning "+g1);
}
public static void Goodevening()
{
Console.WriteLine(" Good Evening"+g2);
}
}
}