PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/WorldView/Structures/Rect.cs

#
C# | 45 lines | 39 code | 6 blank | 0 comment | 0 complexity | c878d89ef7446a7b239bae5455bcd95f MD5 | raw file
 1using System;
 2using System.Drawing;
 3
 4namespace MoreTerra.Structures
 5{
 6    public class Rect
 7    {
 8        private Point topLeft;
 9        private Point bottomRight;
10
11		#region Constructors
12        public Rect(int left, int right, int top, int bottom)
13        {
14            this.topLeft = new Point(left, top);
15            this.bottomRight = new Point(right, bottom);
16        }
17		#endregion
18
19		#region GetSet Functions
20        public Point TopLeft
21        {
22            get
23            {
24                return this.topLeft;
25            }
26        }
27
28        public Point BottomRight
29        {
30            get
31            {
32                return this.bottomRight;
33            }
34        }
35#endregion
36
37		#region Overrides
38        public override string ToString()
39        {
40            return string.Format("{0},{1}", this.topLeft, this.bottomRight);
41        }
42		#endregion
43
44    }
45}