在texbox里面然后换行显示出来

解决方案 »

  1.   

    string[] arr = { "aa", "bb", "cc", "dd" };
    textBox1.Multiline = true;
    textBox1.Height = 200;
    this.textBox1.Lines = arr;
      

  2.   

    string ss="";
    foreach (string s in StringArray)
    {
    ss+=s;
    }
    textbox1.text=ss;
      

  3.   

    我想弹出另一个窗口 然后在这个 窗口中放一个textbox ,然后 把数据放到这个textbox里面
      

  4.   

    form2里声明一个全局变量
    public static string text;然后设置form2中的texbox.text=textform1里用foreach 方法遍历出内容 =form2.text
      

  5.   


    在from1里面用foreach便利后 传到from2里面 弹出来的窗体则是一个一个的弹出来 有几个数据弹出几个 怎么办啊
      

  6.   


    private void Test()
    {
      int[] ary = new int[] { 1, 2, 3 };
      string msg = string.Empty;
      foreach (int num in ary)
      {
        msg += num.ToString() + "\r";
      }
      MessageBox.Show(msg);    
    }使用TextBox显示的话,把Multiline属性设置为true.
      

  7.   

    string[] arr = { "aa", "bb", "cc", "dd" };
     foreach (string num in arr)
      {
        this.Textbox.Text += num.ToString() + "\t";
      }
      

  8.   

    很简单你只需要把数组传过去然后遍历就OK了string[] str = { "aa", "bb", "cc", "dd" };
     foreach (string s in str)
      {
      this.Textbox.Text += s + "\n";
      }