且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Windows窗体上显示数据

更新时间:2023-12-06 16:28:34

使用流阅读器class在formload中使用



use the stream reader class use this in formload

try
            {
                StreamReader sr = new StreamReader(@"C:\Users\Vishnu\Desktop\hind.txt");

                    String txtread;
                    while ((txtread = sr.ReadToEnd()) != null)
                    {


                TextBox1.Text=txtread

                       
                    }
            }
            catch (Exception e)
            {
                

            }