Was browsing through Gustavo Duarte's "Lock Down SQL Server 2005" blog and came across a link for "Generic C# code for executing a delegate with a timeout."
It's a very useful snippet of code and reuseable.
Here's the method signature:
[code:c#]
ExecuteWithTimeout<T>(this Func<T> delegateToRun, TimeSpan timeout)
[/code]
If the execution takes longer than timeout a TimeoutException will occur.