예제 #1
0
        static void Main(string[] args)
        {
            Postit postit1 = new Postit();

            postit1.BackgroundColor = "orange";
            postit1.TextColor       = "blue";
            postit1.Text            = "Idea 1";

            Postit postit2 = new Postit();

            postit2.BackgroundColor = "pink";
            postit2.TextColor       = "black";
            postit2.Text            = "awesome";

            Postit postit3 = new Postit();

            postit3.BackgroundColor = "yellow";
            postit3.TextColor       = "green";
            postit3.Text            = "Superb";
        }
예제 #2
0
        static void Main(string[] args)
        {
            //an orange with blue text: "Idea 1"
            //a pink with black text: "Awesome"
            //a yellow with green text: "Superb!"

            Postit firstPostIt = new Postit("orange", "Idea 1", "blue");

            Console.WriteLine($"{firstPostIt.backgroungColor}, {firstPostIt.text}, {firstPostIt.textColor}");

            Postit secondPostIt = new Postit("pink", "Awesome", "black");

            Console.WriteLine($"{secondPostIt.backgroungColor}, {secondPostIt.text}, {secondPostIt.textColor}");

            Postit thirdPostIt = new Postit("yellow", "Superb", "green");

            Console.WriteLine($"{thirdPostIt.backgroungColor}, {thirdPostIt.text}, {thirdPostIt.textColor}");

            Console.ReadKey();
        }