MyException - 我的异常网
当前位置:我的异常网» C# » C#新建cs中为什么datagridview没数据的

C#新建cs中为什么datagridview没数据的

www.MyException.Cn  网友分享于:2013-02-20  浏览:10次
C#新建cs中为啥datagridview没数据的?
 public class lineIP
        {
            public string[] line1_name = { "a", "B", "C", "D", "X" };
            public string[] line1_ip = new string[5];


            public string[] line2_name = { "1", "2", "3", "4" };
            public string[] line2_ip = new string[4];


            public string[] ceshi_name = { "百度", "新浪", "本机", "腾讯" };
            public string[] ceshi_ip = { "202.108.22.5", "202.108.33.74", "192.168.0.1", "182.254.0.217" };


            public lineIP()
            {
                for (int a = 0; a < 5; a++)
                {
                    line1_ip[a] = "10.121.111." + a;
                }

                for (int b = 0; b < 4; b++)
                {
                    line2_ip[b] = "10.132.222." + b;
                }
            }


        }


 public void chezhan_name_select()
        {
            if (chezhan_ip == null)
            chezhan_ip = new System.Windows.Forms.DataGridView();
            lineIP lineip = new lineIP();

            MessageBox.Show(lineip.line1_name.Count().ToString() + "11111");
            //这句话能显示

            switch (x)
            {
                case 1:
                    for (int i = 0; i < lineip.line1_name.Count(); i++)
                    {

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有