I want to compare string received from UART and compare with each row in a specific column in GUI.
Is this the correct way to do it?
private void compare()
{
int i;
DataSet ds = new DataSet();
compareString = serialPort.Read(); //receive string from UART
while(1){
if(compareString == ds.Tables[0].Rows[i][3].ToString())
{doorOpen();}
else {continue;}
i++;
}
}