I am programming in Windows FormForms and MySQL.
If I declare this in the program, I can use the connection and command objects in the whole .cs page:
in the program,
I can use the connection and command objects in the whole .cs page.
But if I write the code below, connection and command objects are declared twice:
connection and command objects are declared twice. I think one object declaration is the best way. Do Do more object declarations affect the program?