static Rectangle GetRectangle() { int[] input = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); Rectangle rectangle = new Rectangle() { Left = input[0], Top = input[1], Width = input[2], Height = input[3] }; return rectangle; }
public bool IsInside(Rectangle r) { return (r.Left <= Left) && (r.Right >= Right) && (r.Top <= Top) && (r.Bottom >= Bottom); }