I have the next code :
foreach (var te in lin)
{
if (te.Contains("license=") && te.Contains("license=false" ))
{
installertext = installertext.Replace("license=false", "license= " + "true");
}
else if (te.Contains("license="))
{
installertext = installertext.Replace("license=", "license=" + "true");
}
File.WriteAllText(installerfilename, installertext);
}
and in text file
in row who containt license=
appear license=truetrue
.
How I can put the condition to verify if the row is empty or make this code to write just license=true
? I tried to put a break;
but if I do this license=
remain license=