I have a WinForm that a user can select some options and then click a button. The button reads the users options from the screen and determines which DB connection string to use. I want to pass the connection string and an empty DataTable to a backgroundworker in a different class. The background worker will then connect to the db, retrieve the data and return the datatable to be bound to a datagrid on the main form.
I've got everything working with the exception of being able to pass the DataTable.
So, my question is there a way to pass two different data types to a BGW? Or is it possible to wrap the string and datatable into a single object?