You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The simplest way would be to use the existing Func family of delegates.
Use
typeof(Func<,,,,>).MakeGenericType(...).
For example, for your int Del2(int, int, string, int) type:
using System;
class Test
{
static void Main()
{
Type func = typeof(Func<,,,,>);
Type generic = func.MakeGenericType
(typeof(int), typeof(int), typeof(string),
typeof(int), typeof(int));
Console.WriteLine(generic);
}
}
If you really, really need to create a genuinely new type, perhaps you could give some more context to help us help you better.
answered Apr 21 '09 at 15:22
Jon Skeet
758k33150836374