Type Default Value Read Only Static Description
LineCap None No No Gets or sets the starting cap style. This cap will be used to decorate the end of lines drawn using this Pen. Setting the cap style to a value other than LineCap.Custom will set the CustomStartCap property to null.




using (Bitmap bm = new Bitmap(600, 800)) {
  using (Graphics graphics = Graphics.FromImage(bm)) {
    Pen pen = new Pen(Color.Black, 8);
    Font font = new Font("Arial", 10);
    StringFormat format = new StringFormat() { Alignment = 0.5, LineAlignment = 1.0 };
    RectangleF rect = bm.Bounds;
    rect.Inflate(-100, -50);
    graphics.DrawLine(Pens.Red, rect.TopLeft, rect.BottomLeft);
    graphics.DrawLine(Pens.Red, rect.TopRight, rect.BottomRight);
    rect.Height = pen.Width * 3;
    foreach (LineCap cap in (LineCap[])Enum.GetValues(typeof(LineCap))) {
      if (cap == LineCap.Custom || cap == LineCap.AnchorMask)
      pen.StartCap = pen.EndCap = cap;
      graphics.DrawLine(pen, rect.TopLeft, rect.TopRight);
      graphics.DrawString(pen.StartCap.ToString(), font, Brushes.Black, rect, format);
      rect.Offset(0, pen.Width * 5);

The code here iterates through the different types of line caps to show what they look like. The final output is shown below.