I have to develop a project but when i enter this code block Kaspersky Internet Security alert me and delete exe file.
Here is the report:
this code i added after see virus:
foreach (DataGridViewRow idrow in dataGridView8.Rows)
{
TimeSpan diftime = new TimeSpan();
DateTime diftimson;
diftimson = Convert.ToDateTime(idrow.Cells[1].Value);
diftime = diftimson.Subtract(DateTime.Now);
double AradakiFark1 = diftime.Hours + Convert.ToInt32(idrow.Cells[4].Value);
int sonuc1 = Convert.ToInt32(AradakiFark1) / 24;
if (sonuc1 <= 3)
{
MessageBox.Show("3 Months Left For " + sonuc1 + " ", "ATTENTION !", MessageBoxButtons.OK, MessageBoxIcon.Warning);
idrow.Cells[0].Style.BackColor = Color.Red;
idrow.Cells[0].Style.ForeColor = Color.White;
}
}
How can i fix it?
False-positive. Sometimes AV software detects wrongly. It has happened to most developers at some point.
You'll have to set the.exe/project folder as trusted.
Instructions:
Application preferences window
and
The Trusted Zone preferences window
(THese are links to the official docs for said AV software.)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.