using System;
using System.Collections.Generic;
using System.Text;
using smo = Microsoft.SqlServer.Management.Smo;

namespace DynamicAccess
{
    class Program
    {
        static void Main(string[] args)
        {
            smo.Server local = new smo.Server();
            smo.Database database0 = local.Databases[0];
            smo.Property property = database0.Properties
                ["ActiveConnections"];
            property = database0.Properties.GetPropertyObject
                ("ActiveConnections");
            property = database0.Properties.GetPropertyObject
                ("ActiveConnections", false);
            int count = database0.ActiveConnections;
        }
    }
}
