c# - What is the best use of a variable when required by multiple methods -


i'm using xmlmanager xml manipulations in several methods in class.where should declare xmlmanager variable ? 1.locally within each method , intialization. 2 declare @ globally , initiate @ method level

as is, in question, there's absolutely no difference whatsoever because there's neither performance gain nor significant design issues.

maybe if question put context there reason choose 1 approach on other, stands now. none of approach better other one


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -