best way to save a value in C# App
i wondering whether better save value in global variable or save in invisibale label on c# windows application , retrieve whenever needed. and question have sql conneciton. have form during form_load, calls 6-8 functions from classes. in each function, sql connection opened and closed. i'm kind of concerned memory management , speed of application. read somewhere better not pass sqlconnection ref funciton. best way implement this? thank you, thanks responses. helpful. sqlconnection, still i'm little bit confuse. imagine have 2 classes , call method form_load: ...form_load(...) class1.findname(); class1.findlastname(); class2.getinfo(); and in each method open , close each connection: sqlconnection1.open(); using(sqlconnection1) { ... } i'm calling 3 functions, different instances of sqlconnection opened , closed 3 times. connection string same i believe sqlconnection pool take care of still doesn't me. suggestion? does hav ...