C#的练习小程序集锦
21 、字串变量.Replace("子字串","替换为") 字串替换 如: string str="中国"; str=str.Replace("国","央"); //将国字换为央字 Response.Write(str); //输出结果为“中央” 再如:(这个非常实用) string str="这是脚本"; str=str.Replace("
21 、字串变量.Replace("子字串","替换为") 字串替换 如: string str="中国"; str=str.Replace("国","央"); //将国字换为央字 Response.Write(str); //输出结果为“中央” 再如:(这个非常实用) string str="这是脚本"; str=str.Replace("