Home>

Select the folder to save and display the path in the textbox.
I want to check the textbox path and save the file.
However, when a folder is selected, it cannot be saved without a \ mark at the end.
How can I put a backslash at the end of the path?
Thank you.

private void button1_Click (object sender, EventArgs e)
        {
            string path = textBox1.Text;
</// Omitted since other operations from here
        }
        private void button2_Click (object sender, EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog ();
            if (fbd.ShowDialog () == DialogResult.OK)
            {
                textBox1.Text = fbd.SelectedPath;
            }
        }

What I did
string path = textBox1.Text + "\";
It was useless.