Russel
Russel

Reputation: 111

Readymade delegates in ASP.NET 2.0

What are the readymade delegates like

delegate void Action<T>(T obj);
delegate TOutput Converter<TInput, TOutput>(TInput input);
delegate Boolean Predicate<T>(T obj);
Function delegate

available in ASP.NET 2.0.

Upvotes: 0

Views: 384

Answers (2)

TheQult
TheQult

Reputation: 374

All of these are 3.5 c# stuff so the answer is no one (but you can declare them by your own)

Upvotes: 0

LukeH
LukeH

Reputation: 269498

Try something like this to print a list, although the list will also contain any special-purpose delegates too:

foreach (Type t in typeof(object).Assembly.GetTypes())
{
    if (t.IsPublic && typeof(Delegate).IsAssignableFrom(t))
        Console.WriteLine(t.Name);
}

Upvotes: 1

Related Questions