示例#1
0
 public static int CalculateArea(Square s)
 {
     return s._height*s._height;
 }
示例#2
0
 public void fourForSquare()
 {
     var result = new Square { _height = 4};
     Assert.AreEqual(16, AreaCalculator.CalculateArea(result));
 }
示例#3
0
        private static void FillSquare(int a, Square square)
        {
            square.A = a;

            Console.WriteLine($"{a} * {a} = {square.Area}");
        }