Answer the question
In order to leave comments, you need to log in
Why doesn't file.exists see the file?
private void button2_Click(object sender, EventArgs e) // Кнопка проверки
{
if (textBox1.Text == string.Empty) // Условие если поле пустое
{
MessageBox.Show("Вы не указали сетевое имя!");
return;
}
Directory.Exists(@"G:\std\profiles\" + textBox1.Text);
if (File.Exists("cfg.txt"))
{
rezu.Text = ("Профиль существует!");
rezu.ForeColor = Color.Red;
return;
}
else
rezu.Text = ("Профиль пустой!");
rezu.ForeColor = Color.Green;
}
Directory.Exists(@"G:\std\profiles\" + textBox1.Text);
if (File.Exists("cfg.txt"))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question