Guest User

Untitled

a guest
Aug 10th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. Replace \\ with \ in FolderDialogBox.SelectedPath
  2. private void label1_Click(object sender, EventArgs e)
  3. {
  4. folderBrowserDialog1.ShowNewFolderButton = false;
  5.  
  6. if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
  7. {
  8. string p = @folderBrowserDialog1.SelectedPath; //=> Selected C:ACTNT
  9. //removing @ in front of folderBrowserDialog1 does not change the situation
  10. strPathName.Text = p; // => display c:ACNT
  11. con = "database = " + p; // => actual value "database = c:\ACNT"
  12. UpdateTableName();
  13. }
  14. }
  15.  
  16. string myvar = @"c:myfile.txt";
  17.  
  18. string path = @"C:\test";
  19. path=path.Replace(@"\", @"");
  20.  
  21. @"c:test".
Add Comment
Please, Sign In to add comment