I'm trying to store a function reference in a Delegate type for later use.
Here's what I'm doing:
class Program
{
static void Test()
{
}
static void Main(string[] args)
{
Delegate t= (Delegate)Test;
}
}
In this I'm getting following error:
Cannot convert method group 'Test' to non-delegate type 'System.Delegate'.
Did you intend to invoke the method?
Why is this happening?