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)
我认为两者都是一样的,但第一个声明不起作用.第二个是.请帮我解决问题.