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

namespace Expensive
{
    class Program
    {
        static void Main(string[] args)
        {
            smo.Property p;
            smo.Server local = new smo.Server();
            smo.Database database0 = local.Databases[0];
            p = database0.Properties.GetPropertyObject
                ("ActiveConnections", false);
            Console.WriteLine(p.Name +
                " Expensive ="  + p.Expensive  +
                ", Retrieved = "  + p.Retrieved);
            
            database0.Initialize(true);
            p = database0.Properties.GetPropertyObject
                ("ActiveConnections", false);
            Console.WriteLine(p.Name +
                " Expensive =" + p.Expensive +
                ", Retrieved = " + p.Retrieved);

            Object obj = p.Value;
            int a = 1;

        }
    }
}
