CGRect rect = new CGRect(10, 10, 50, 50); double maxX = rect.GetMaxX(); //returns 60
CGRect rect1 = new CGRect(10, 10, 50, 50); CGRect rect2 = new CGRect(70, 10, 50, 50); double maxX1 = rect1.GetMaxX(); //returns 60 double maxX2 = rect2.GetMaxX(); //returns 120In this example, we create two CGRect objects. We call the GetMaxX method on each of them, which returns the X coordinate of the right edge of each rectangle. Package/Library: CoreGraphics