Пример #1
0
        public void MyTestMethod()
        {
            var target = new DemoDing();
            int k;

            target.MakeSix(out k);

            target.AddOne(ref k);

            Assert.AreEqual(7, k);
        }
Пример #2
0
        public void OverloadingTest()
        {
            var target = new DemoDing();

            target.M();
            target.M(4);
            target.M(2, 3);
            target.M(1, 2, 3);
            target.M(a: 1, b: 2, c: 3);
            target.M(a: 1, c: 3);
            target.M(1, c: 3);
            target.M(c: 3, b: 2, a: 1);
            int a = 4;

            target.M(1, 3);

            target.M(new int[] { 2, 3, 5, 7, 11 });
        }