using System.Drawing; Pen myPen = new Pen(Color.Blue, 2); myPen.DashStyle = DashStyle.DashDotDot;
using System.Drawing; Graphics graphics = this.CreateGraphics(); Pen blackPen = new Pen(Color.Black, 3); Point startPoint = new Point(10, 10); Point endPoint = new Point(100, 100); graphics.DrawLine(blackPen, startPoint, endPoint);In both examples, the Pen class is used with the System.Drawing namespace. Therefore, the package library is System.Drawing.