title: how to draw a line on a image?
body: <p>i want to draw a line on a bmp image which is pass into a method using drawline method in C#</p>
  
  <pre><code>public void DrawLineInt(Bitmap bmp)
  {
  
  Pen blackPen = new Pen(Color.Black, 3);
  
  int x1 = 100;
  int y1 = 100;
  int x2 = 500;
  int y2 = 100;
  // Draw line to screen.
  e.Graphics.DrawLine(blackPen, x1, y1, x2, y2);
  }
  </code></pre>
  
  <p>this give a error.So i want to know how to include paint event here 
  (PaintEventArgs e  )</p>
  
  <p>and also want to know how to pass parameters when we calling drawmethod?
  example</p>
  
  <pre><code>DrawLineInt(Bitmap bmp);
  </code></pre>
  
  <p>this give the following error
  "The name 'e' does not exist in the current context "</p>