画线问题
public partial class Form1 : Form{
public Form1()
{
InitializeComponent();
}
protected override void OnPaint(PaintEventArgs e)
{
Graphics g=e.Graphics;
using (Pen blackPen=new Pen(Color.Black,1))
{
for(int y=0;y<ClientRectangle.Height;y+=ClientRectangle.Height/10)
{
g.DrawLine(blackPen,new Point(0,0),new Point(ClientRectangle.Width,y));
}
}
}
}
using (Pen blackPen=new Pen(Color.Black,1))
这是什么意思。怎么下面还有括号??