using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Microsoft.SqlServer.Management;
using Microsoft.SqlServer.Management.Smo;


namespace ListDatabases
{
    class Program
    {
        static void Main(string[] args)
        {
            Server Canopus5 = new Server("CANOPUS5");
            foreach (Database database in Canopus5.Databases)
            {
                Console.WriteLine(database.Name);
            }
        }
    }
}
