C#字符串替换 [英] C# string replace
本文介绍了C#字符串替换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想用;
替换我的字符串中的,
。
I want to replace ","
with a ;
in my string.
例如:
更改
文本,文本, ; Text;
"Text","Text","Text",
为此:
Text; Text;文本,
"Text;Text;Text",
我一直在尝试 line.replace(...,...)
,但无法正常工作。
I've been trying the line.replace( ... , ... )
, but can't get anything working properly.
推荐答案
尝试一下:
line.Replace("\",\"", ";")
这篇关于C#字符串替换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文