Hi Ramesh, its easy to use SqlConnection Class. You just need to build a connection string and create an instance of SqlConnection.
string ConnectionString = "Data Source=[your remote server IP]\[username];Initial Catalog=[databasename to connect];Persist Security Info=True;User ID=[sqluserid];Password=[sqluserPassword]"
SqlConnection sqlConn = new SqlConnection(ConnectionString);
sqlConn.Open();