小编Kis*_*ary的帖子

字符串替换不在asp.net中工作

string mystring="the are boys";

string[] tags = {"the"};

string[] replace ={"they"}

mystring.Replace(tags[0],replace[0]) // is not working

mystring.Replace("the","they") // is working 
Run Code Online (Sandbox Code Playgroud)

我认为两者都是一样的,但第一个声明不起作用.第二个是.请帮我解决问题.

c# replace

3
推荐指数
1
解决办法
533
查看次数

标签 统计

c# ×1

replace ×1