How to simulate a "Func<(Of <(TResult>)>) Delegate" in .NET Framework 2.0?

.net, c#

Solution

Luckily, .NET 2.0 already supports generics, so you can just create your own delegate with the same signature:

public delegate T Func<T>();

Problem

I try to use the class from this CodeProject article in VB.NET and with .NET Framework 2.0. Everything seem to compile except this line `Private _workerFunction As Func(Of TResult)` and the method header `Public Sub New(ByVal worker As Func(Of TResult))`. I can find on MSDN that these new delegates (Func(Of ...) are supported from .NET 3.5. How can I rewrite that to work in .NET 2.0?

Original source