of course Not ,  U can use const String to do that , means your string cann't to be modified

解决方案 »

  1.   

    of course Not ,  U can use const String to do that , means your string cann't to be modified
    ---------------------------------------------------------------------------------
    string is not String;
    string is type of var,but String is static class;
    you can do:
    string[] mystrs[];
    ………………//init mystrs;
    textBox2.Text=mystrs.toString(); 
      

  2.   

    数组没有那样的方法吧。用循环很麻烦吗?
     你写错了。
      foreach(string str1 in mystr)
       textBox2.AppendText(str1 + "\n");  .toString()只是返回对数组的对象字符串。 
      

  3.   

    daou101(海天一鸥) 似乎说得不对吧:<
    请看:using System;class Test{
      public static void Main(){
         string[] str = new string[4];
         for(int i = 0; i < str.Length; i++)
            str[i] = i.ToString();
         string str2 = str.ToString();
         Console.WriteLine(str2);
      }
    }编译后输出为:
    System.String[]
    并非daou101(海天一鸥)所期望的那样
      

  4.   

    textBox2.Text=mystrs.toString();好像不行啊
      

  5.   

    当然可以了!
    1、你要把this.textBox1.Multiline = true;
    2、string[] demo=new string[4];
    demo[0]="oooo";
    demo[1]="1111";
    demo[2]="2222";
    demo[3]="3333";
    foreach(string str in demo)
    {
    this.textBox1.AppendText("\r\n"+str);
    }
    看看吧!
      

  6.   

    dldl(403) ( ) 你不就已经用了循环的吗!
    在我看来好象不行!
      

  7.   

    做了个例子你看一看:(是可以远行的)
    string[] str ;
    str = new string[50];
    for (int i =0;i<50;i++)
    {
    str[i]=i.ToString();
    } foreach (string mystr in str)
    {
    this.TextBox1.Text+=mystr+"\n ";
    }
      

  8.   

    this.textBox2.Text = String.Concat("\n", mystr);
      

  9.   

    错了,是Join方法:
    this.textBox2.Text = String.Join("\n", mystr);
      

  10.   

    string[] str=new string[50];
    for(int i=0;i<50;i++)
    {
       str[i]=i.ToString();
    }
    textBox1.Text=string.Join("\n",str);
    join后的字符串的确变成了"1\n2\n3\n......"的形式
    问题是把它传给textBox后"\n"并没有起到回车的作用,显示的字符串整个连在了一起
    怎么回事呢?
      

  11.   

    大家在讨论什么?
    用循环怎么都可以,
    但楼主不让用循环啊。楼上几位:foreach也是循环