using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Management.Common;
using System.Security;
namespace SqlLoginConstruct
{
    class Program
    {
        static void Main(string[] args)
        {
            Type t = typeof(char[]);
            Console.WriteLine(t.IsSubclassOf(typeof(ValueType)));
            String name = "Bob";
            String pwd = "P@ssw0rd";
            ServerConnection canopus5 =
                new ServerConnection(
                "CANOPUS5", name, pwd);
            canopus5.Connect();
            SecureString spwd = new SecureString();
            spwd.AppendChar('P');
            spwd.AppendChar('@');
            spwd.AppendChar('s');
            spwd.AppendChar('s');
            spwd.AppendChar('w');
            spwd.AppendChar('0');
            spwd.AppendChar('r');
            spwd.AppendChar('d');
            spwd.MakeReadOnly();
            Console.WriteLine(spwd.ToString());
            canopus5 =
                new ServerConnection(
                "CANOPUS5", name, spwd);
            
            Console.WriteLine(canopus5.Password);
        }
    }
}
