获取单元格值的数据类型

        //单元格点击事件
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
//获取某个单元格的值的数据类型名称
MessageBox.Show(dataGridView1[e.ColumnIndex, e.RowIndex].Value.GetType().Name);
}

 

你可能感兴趣的:(数据类型)