가격에 값이 없는 경우 발생하는 null 오류 수정
This commit is contained in:
@@ -126,7 +126,7 @@ namespace ISBN_Check_test
|
||||
string[,] grid = new string[dataGridView1.Rows.Count, 6];
|
||||
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||
{
|
||||
string price = dataGridView1.Rows[a].Cells["price"].Value.ToString();
|
||||
string price = dataGridView1.Rows[a].Cells["price"].Value?.ToString() ?? string.Empty;
|
||||
int count = a + 1;
|
||||
grid[a, 0] = count.ToString();
|
||||
grid[a, 1] = dataGridView1.Rows[a].Cells["after_book_name"].Value.ToString();
|
||||
|
||||
Reference in New Issue
Block a user