How can I save file in the dir "Data", which I add to the project earlier. My project' s called Sol1, so here' s the code I' m using:
Why it doesn' t create a file in "Data"?
Code:
private void OK_Click(object sender, EventArgs e)
{
RegFile = new FileInfo("Sol1.Data." + MyCombo.SelectedItem.ToString() + ".mdb");
for (int i = 0; i < 23; i++)
{
if (RegFile.Exists == true)
{
MessageBox.Show("Exists!", "Sol1");
return;
}
else if (i == MyCombo.SelectedIndex)
{
RegFile.Create();
}
}
}
Comment