I really don't understand the first part of your question, but assuming all of the possible servers are accessed the same way, all you really have to do is ask for a server machine (and maybe instance), and credentials (if applicable). Then a simple string substitution in the connection string with the specified data should get you where you want to gpo.
Getting a list of all tables in the connected database:
SELECT * FROM information_schema.tables
Whether you use a stored proc or a simple query from your C# code is completely up to you.