除了第一次出现之外,如何替换字符串中的字符串?
例如C:\\Test-Processed\1-Processed\2-Processed
应该输出
C:\\Test-Processed\1\2
在我的Windows窗体应用程序中,我有一个textbox和backgroundworker组件.在dowork的情况下,backgroundworker我试图访问文本框的值.我怎样才能做到这一点?当我尝试访问文本框的值时,我在dowork事件处理程序代码中遇到异常:
Cross-thread operation not valid: Control 'txtFolderName' accessed from a thread other than the thread it was created on`
Run Code Online (Sandbox Code Playgroud)