What is difference between this two C# methods
- by RICH KID SMART KID
What is the difference between these two cases. Firstly, if I open the connection and pass it into my method as a parameter, compared to opening the connection directly in the method?
cnn.open()
func(cnn,param1,param2);
vs
func(cnn, param1,param2)
{
cnn.open();
//open connection here
}