Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
How to Replace String in C#
WhatsApp
Pintoo Yadav
Dec 19
2014
1.8
k
0
1
string
str1 =
"ppp"
;
string
str2 =
"ccc"
;
string
str3 =
"kkk"
;
string
strAll3 = str1 +
", "
+str2+
", "
+str3 ;
string
[] strArray = strAll3.Split(
','
);
foreach
(
string
itm
in
strArray)
{
Console.WriteLine(itm.ToString() );
}
======
public
string
rep(
string
data) { data.Replace(
'\','
\\');
return
data; }
===
data = data.Replace(
"\\", "
\\\\");
C#
String in C#
String
Up Next
How to Replace String in C#