コード例 #1
0
ファイル: Program.cs プロジェクト: tborzyszkowski/CS_OOP
        static void Main(string[] args)
        {
            Pierwsza p1 = new Pierwsza();

            p1.X = 5;
            Pierwsza p2 = p1;

            p2.X = 7;
            Console.WriteLine($"p1.x = {p1.X}, p2.x = {p2.X}");

            First f1 = new First();

            f1.X = 5;
            First f2 = f1;

            f2.X = 7;
            Console.WriteLine($"f1.x = {f1.X}, f2.x = {f2.X}");

            int x = 5;
            int y = x;

            y = 7;
            Console.WriteLine($"x = {x}, y = {y}");

            int  pierwsza = 0, druga = 0;
            bool result = Pierwsza.Addition(out pierwsza, out druga);

            Console.WriteLine($"{result} - {pierwsza} - {druga}");
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Pierwsza p1 = new Pierwsza();

            p1.x = 5;
            Pierwsza p2 = p1;

            p2.x = 7;
            Console.WriteLine("p1.x = {0}, p2.x = {1}", p1.x, p2.x);

            First f1 = new First();

            f1.x = 5;
            First f2 = f1;

            f2.x = 7;
            Console.WriteLine("f1.x = {0}, f2.x = {1}", f1.x, f2.x);
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: vix95/CS_OOP
        static void Main(string[] args)
        {
            Pierwsza p1 = new Pierwsza();

            p1.X = 5;
            Pierwsza p2 = p1;

            p2.X = 7;
            Console.WriteLine($"p1.x = {p1.X}, p2.x = {p2.X}");

            First f1 = new First();

            f1.X = 5;
            First f2 = f1;

            f2.X = 7;
            Console.WriteLine($"f1.x = {f1.X}, f2.x = {f2.X}");

            int x = 5;
            int y = x;

            y = 7;
            Console.WriteLine($"x = {x}, y = {y}");
        }