string ss="111"+"11111"....."+"号就可以了

解决方案 »

  1.   

    n是个未知数,谁知道用表达式?再问两个函数:字符串的查找和截取函数,比如获取"select count(*) from [news_type] where [fatherid]=0"中的"from [news_type] where [fatherid]=0"
      

  2.   

    问题1:
    ss="";
    for(int i = 1 ;i<=n ; i++)
    {
    ss=ss+"s";
    }
    问题2:
    截取:
    ss="select count(*) from [news_type] where [fatherid]=0"中的"from [news_type] where [fatherid]=0"
    string GetNewStr = ss.SubString(17);
    查找:
    int i = ss.IndexOf(@"from [news_type] where [fatherid]=0");
    如不存在,返回-1。
      

  3.   

    简单方法:
    如果是一个字符
    "".PadLeft(10,'s')
    new String('s',10)
    否则
    "".PadRight(10).Replace(" ","abc")
      

  4.   

    问题解决,给分!
    hu77wei(木村) (15),qiushuiwuhen(秋水无恨) (5)
    感谢两位!