SyntaxFix
Write A Post
Hire A Developer
Questions
dataGridView1.Columns is probably of a length less than 5. Accessing dataGridView1.Columns[4] then will be outside the list.
dataGridView1.Columns
dataGridView1.Columns[4]