コード例 #1
0
    public static void Main(string[] args)
    {
        SocialMediaAccount timothy = new SocialMediaAccount();

        timothy.Login = "******";
        timothy.Email = "*****@*****.**";
        // timothy.IsActive = true; // cannot access private component

        timothy.Display();
        System.Console.WriteLine();

        timothy.AddConnection(100);
        System.Console.WriteLine("Has connections: " + timothy.HasConnections());
        System.Console.WriteLine("Is ID 100 a friend? " + timothy.IsFriend(100));
        System.Console.WriteLine("Is ID 100 a friend? " + timothy.IsFriend(200));
    }