首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

注释代码!该怎么处理

2012-02-15 
注释代码!帮我注释下面这段代码 ~ 详细点的!private void button1_Click(object sender, EventArgs e){try

注释代码!
帮我注释下面这段代码 ~ 详细点的!


private void button1_Click(object sender, EventArgs e)
  {
  try
  {

  rows = dataGridView1.Rows.Count - 1;
  id =new int[rows];
  priority =new int [rows];
  cputime =new int [rows];
  alltime=new int [rows];
  startblock = new int[rows];
  blocktime =new int [rows];
  state=new string [rows];
  for (int r = 0; r < rows; r++)
  {
  id[r] = Convert.ToInt32(dataGridView1.Rows[r].Cells[0].Value);
  priority[r] = Convert.ToInt32(dataGridView1.Rows[r].Cells[1].Value);
  cputime[r] = Convert.ToInt32(dataGridView1.Rows[r].Cells[2].Value);
  alltime[r] = Convert.ToInt32(dataGridView1.Rows[r].Cells[3].Value);
  startblock[r] = Convert.ToInt32(dataGridView1.Rows[r].Cells[4].Value);
  blocktime[r] = Convert.ToInt32(dataGridView1.Rows[r].Cells[5].Value);
  state[r] = Convert.ToString(dataGridView1.Rows[r].Cells[6].Value);

  }
  }  
  catch(Exception se)
  {
  MessageBox.Show(se.Message);

[解决办法]
Convert.ToInt32 转换成INT型 其他没什么难的 楼主在VS2005里面智能感知都能看明白了。

热点排行