Hello everyone
I'm fairly new to VB.NET (Java is my specialty) but my senior project at college is requiring me to play with VB.NET. (Not that I have anything against it, just not my strongest language
)
I have an application that has to complete a potentially very time consuming task. I would like to be able to limit the max amount of time that task can process before a timeout exception is thrown. Right now I'm trying to use a Timer to throw the exception but I'm guessing I need to work some threading in here somehow.
I start the timer and execute the task. If the Timer event fires, it throws an exception. Unfortunately it doesn't appear to be catching the exception and halting the task like it should
Any ideas or suggestions would be greatly appreciated.
I'm fairly new to VB.NET (Java is my specialty) but my senior project at college is requiring me to play with VB.NET. (Not that I have anything against it, just not my strongest language
I have an application that has to complete a potentially very time consuming task. I would like to be able to limit the max amount of time that task can process before a timeout exception is thrown. Right now I'm trying to use a Timer to throw the exception but I'm guessing I need to work some threading in here somehow.
I start the timer and execute the task. If the Timer event fires, it throws an exception. Unfortunately it doesn't appear to be catching the exception and halting the task like it should
Any ideas or suggestions would be greatly appreciated.