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
Post a Comment