for example you can make a new class : sqlParms.cs
then in that class you can create any function you want depending on the level you want to work on it : in simple cases you can create a function called getConn which return the connection string and the call it like that :
sqlParms prms=new sqlParms();
SqlConnection con=prms.getConn();
this is the simple way. other you can do more complicated work by using digimanus link ...
regards