Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Eliminate duplicates char in string either upper or lower case
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { string name = "Awah"; string newName = ""; foreach(char value1 in name.ToLower()) { if(newName.IndexOf(value1) == -1) { newName = newName + value1; } } Console.Write(newName); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Helloworld
Ty
466
C# Dictionary with Enum Keys And Values
test_hash
math 5.74
Random
Hssbddbsv
linq jean by Fausto
C# - out parameters and reference parameters
Please log in to post a comment.