What is generic delegate
What is generic delegate and how to use it.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Sep 21, 2012, 8:05 AM
An example is the Func
Here's a simple example of using this generic delegate:
using System;
class Test
{
static void Main()
{
Func
string str = func(new char[]{'a', 'b', 'c'});
Console.WriteLine(str); // abc
Console.ReadKey();
}
static string CreateString(char[] chars)
{
return new string(chars);
}
}