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
Find Modified Word From String In C#
WhatsApp
Bikesh Srivastava
Aug 24
2016
781
0
1
using
System;
using
System.Net.NetworkInformation;
using
System.Net;
using
System.Net.Sockets;
using
System.Text.RegularExpressions;
namespace
Example
{
class
Program
{
static
void
Main()
{
string
s1 =
"When you are writing server code you can never be sure what the IP address you see is refereeing to.In fact some users like it this way."
;
string
s2 =
"When you are wrting server code yu cannn never be sure what the IP address you see is refering to.In fact some users like it this way"
;
string
[] tempArr1 = s1.Split(
' '
);
string
[] tempArr2 = s2.Split(
' '
);
int
counter = 0;
for
(
int
i = 0; i < tempArr1.Length; i++)
{
if
(tempArr1[i] != tempArr2[i])
{
Console.WriteLine(tempArr1[i] +
", "
+ tempArr2[i]);
counter++;
}
}
Console.WriteLine(
"Total Modified Word::"
+counter);
Console.ReadLine();
}
}
}
Find Modified Word
String In C#
C#
Up Next
Find Modified Word From String In C#