Generate mysql connections from a function

I hope they are well.
I would like to know if you can pass (as a parameter) a mysql connector inside a function. This on vb.net.
It's possible?
From already thank you very much.