I was wondering if there is any possible way to simplify this.
if (string != "")
{
dataGridView1.Rows.Add(string);
}
All I can find is how to shorten if statements which return a value, not execute a method like mine.
>Solution :
There is not much to do from where you are already. I would only suggest inverting the if statement to reduce nesting. You could also remove the braces by using this method like this:
if (string == "") return;
dataGridView1.Rows.Add(string);