top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How to remove duplicate characters from String in C#?

+2 votes
62 views
How to remove duplicate characters from String in C#?
posted May 3, 2017 by Madhavi Kumari

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

Use this code:

public static string RemoveDuplicates(string input)
{
return new string(input.ToCharArray().Distinct().ToArray());
}

answer May 5, 2017 by Manikandan J
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...