Copy SQL Server database between servers

Example of using SQL Server Management Objects (SMO) to copy a database from one server to another.