I have set the textbox to public so that another form can access it but when i run it in debug mode with the following line it gives me exception so it doesn't store correct directory.
If I enter D:\newfolder it gives me D:\\newfolder. Why does it add the extra \.
Here's the exception:
An exception 'Microsoft.VisualStudio.Debugger.Runtime.CrossThreadMessagingException' occurred
Here's the line where the exception occurs.
Choose is a class in the same namespace as the method which contains this string.
The method is in a different class than the choose class.
txtbxTargetDir is the name of the textbox.
string targetPath = StaticFormInstances.choose.txtbxTargetDir.Text;
Edited by lotrsimp12345: n/a