To avoid having unnecessary code in my program, I am wondering which choice should I use:
- Use the statement like this
Imports System.Threadingand then use the codeDim myTimer As Timer - Do not use the statement
Imports System.Threadingat all, but use a full declaration like this:Dim myTimer As System.Threading.Timer
Both choices give the desired result, but I want to avoid adding all extra code from System.Threading that I do not need.
The question came to my mind when I saw the answer to the question here: How to correctly terminate an application?
Here the user wrote …Threading.Timer(…, but didn't use Threading on the Timeout.Infinite.
Since I am using System.Threading in only one point in my code, which choice would be better?
Thank you.