using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Smo.Broker;
namespace NoSBQueueExtProp
{
    class Program
    {
        static void Main(string[] args)
        {
            Server local = new Server();
            Database msdb = local.Databases["msdb"];
            foreach(ServiceQueue sq in msdb.ServiceBroker.Queues)
            {
                foreach (ExtendedProperty ep in sq.ExtendedProperties)
                {
                    Console.WriteLine(ep.Name);
                }
            }
        }
    }
}
