Here is my data result code
it gets duplicate line results
I wanna remove duplicate result
Please help me
private void DataResult(string result, string acc, string file)
{
lock (this)
{
if (result == "good")
{
MetroTextBox metroTextBox = this.textBox1;
metroTextBox.Text = metroTextBox.Text + acc + Environment.NewLine;
file = Path.Combine(this.papka, "good.txt");
if (!Directory.Exists(this.papka))
{
Directory.CreateDirectory(this.papka);
}
File.AppendAllText(file, acc + "\r\n");
Listing.good++;
}
if (result == "error")
{
Listing.error++;
}
}
}