가격에 값이 없는 경우 발생하는 null 오류 수정
This commit is contained in:
@@ -20,6 +20,7 @@ namespace ISBN_Check_test
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.dataGridView1.EditMode = DataGridViewEditMode.EditOnKeystrokeOrF2;
|
||||
this.Text = $"{Application.ProductName} ver {Application.ProductVersion}";
|
||||
}
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
|
||||
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||
// 기본값으로 할 수 있습니다.
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.1")]
|
||||
// [assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.1")]
|
||||
|
||||
@@ -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