Rectangle rect = new Rectangle(1, 1, 4, 3); Point point = new Point(3, 2); bool contains = rect.Contains(point); Console.WriteLine(contains); // True
Rectangle rect1 = new Rectangle(0, 0, 5, 5); Rectangle rect2 = new Rectangle(1, 1, 3, 3); bool contains = rect1.Contains(rect2); Console.WriteLine(contains); // TrueBoth examples use the System.Drawing package library to define and perform operations on rectangles and points.