GraphicsPath path = new GraphicsPath(); path.AddLine(0, 0, 50, 50); path.AddLine(50, 50, 100, 0); PointF lastPoint = path.GetLastPoint();
GraphicsPath path = new GraphicsPath(); path.AddRectangle(new Rectangle(0, 0, 100, 50)); PointF lastPoint = path.GetLastPoint();This example creates a GraphicsPath object and adds a rectangle shape to it. The GetLastPoint method is then called to retrieve the last point of the path, which is (100, 50) in this case. The package library used in these examples is the System.Drawing.Drawing2D library, which is part of the .NET framework.