コード例 #1
0
 public Circle(ReactangleF reactangleF) : base(reactangleF)
 {
     if (reactangleF.width != reactangleF.height)
     {
         throw new ArgumentOutOfRangeException("widht height", "The width and height must to have the same value");
     }
 }
コード例 #2
0
        public Ellipse(ReactangleF reactangleF)
        {
            if (reactangleF.width <= 0)
            {
                throw new ArgumentOutOfRangeException("width", "Ellipse width must to be greater than 0.");
            }

            if (reactangleF.height <= 0)
            {
                throw new ArgumentOutOfRangeException("height", "Ellipse height must to be greater than 0.");
            }
            this.reactangleF = reactangleF;
        }