I have a method that gets called on a Timer event (so every .5 seconds or so). In the method, I declare a variable and assign a value to it. The variable is not used anywhere else, which is why I defined it in the method.
However, I was wondering if it makes more sense to just declare the variable globally and re-assign to it in the method. Wouldn't that save on resources needed to re-create the variable every .5 seconds?

I'm guessing this type of question has been asked (and answered) many times but couldn't find anything with a quick google search. If you have a link to an article explaining this sort of thing, I'd appreciate it.

Thanks.