在Windows窗体应用程序中显示列表 [英] Display list in windows form application

查看:500
本文介绍了在Windows窗体应用程序中显示列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想显示列表的结果。

是否可以在控制台中显示列表(程序是Windows窗体),因为列表excludedNames有很多值。哪个是显示结果的最佳方式。?。



I want to Display results of the list .
Is it possible to display the list in console (program is windows form)as list excludedNames has many values. Which is the best way to display the result.?.

private void bt_compare_Click(object sender, EventArgs e)
        { 
            
                           
          table1 = GetDataTabletFromCSVFile(tbCSVPath.Text);

          table2 = GetDataTabletFromCSVFile1(tbCSVPath1.Text);
           
       
            List<string> excludedNames = new List<string>();
            
            for (int i = 0; i < table1.Rows.Count; i++)
            {
                string col = table1.Rows[i]["Par Name"].ToString();
                if (!table2.Columns.Contains(col))
                {
                   excludedNames.Add(col);
                   
                }


            } 
            
          

           
        
        }

推荐答案

在控制台中,你没有得到很多选择:Console.WriteLine几乎是你的命运:

In a console, you don't get a lot of options: Console.WriteLine is pretty much your lot:
foreach (string s in excludedNames)
   {
   Console.WriteLine(s);
   }


这篇关于在Windows窗体应用程序中显示列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆