c# - 允许进程自动继续的 MessageBox

标签 c# .net ssis

我希望显示一个消息框,程序继续运行,而不是等待我单击此消息框上的“确定”。可以吗?

else
{
    // Debug or messagebox the line that fails
    MessageBox.Show("Cols:" + _columns.Length.ToString() + " Line: " + lines[i]);

}

最佳答案

//You need to add this if you don't already have it

using System.Threading.Tasks;

//然后这是你的代码,将运行主线程的异步;

Task.Factory.StartNew( () =>
{
   MessageBox.Show("This is a message");

 });

关于c# - 允许进程自动继续的 MessageBox,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10634663/

相关文章:

c# - ASP.NET Identity 2.0 中基于 token 的登录逻辑更改

c# - 保存 XML 时 XmlWriter 格式困惑

c# - 无法将字符串转换为枚举

.net - 将更新 checkin TFS 后编辑变更集注释

sql-server - 有没有办法在每个 SSIS 包之前和之后启动存储过程?

sql-server - 读取大 Excel 文件时收到 "not enough storage"错误

c# - 有什么理由为常量计算 INT 吗?

.net - TPL 数据流和 Rx 组合示例

.net - 如何使用iTextSharp将PDF与可填写的表单字段合并/合并?

c# - 选择 2 个日期时间值之间的数据