c#写入剪贴板报错
public static void Execute(Dictionary<string, string> stringDic,Dictionary<string, List<string>> listDic, Dictionary<string, int> intDic){
System.Windows.Forms.Clipboard.SetText(stringDic["文件集"]);
}
c#把变量写入剪贴板
System.Windows.Forms.Clipboard.SetText(stringDic["文件集"]);
单步测试正常
打包时或测试运行时出错
运行C#代码:编译出错:调用的目标发生了异常。在可以调用 OLE 之前,必须将当前线程设置为单线程单元(STA)模式。请确保您的 Main 函数带有 STAThreadAttribute 标记。
怎么解决
6.6报错,导入7.3错误依然在。需要在7.3重写就正常了
页:
[1]