I’m pretty sure all of you know the WebRequest and it’s derived class HttpWebRequest.
And what a marvelous property both of them have – the TimeOut.
Yesterday I had to write some app that reads files located on some remote computer.
As I knew already this ins’t such a good practice, because your code can just hang/freeze for seconds waiting for that UNC path to become available or just checking it’s existence.
Still, I had to provide some quick solution and “hoping for the best” wasn’t good enough.
So, this is what I came up with.
public static T Limex<T>(Func<T>…