Skip to content

Instantly share code, notes, and snippets.

Created March 14, 2022 03:33
What would you like to do?
Remove Duplicate Characters from a String
using System;
public class Program
public static void Main()
String inputStr, resultStr = String.Empty;
Console.WriteLine("Enter a string:");
inputStr = Console.ReadLine();
for(int i = 0; i < inputStr.Length; i++){
resultStr += inputStr[i];
Console.WriteLine("Final String: "+resultStr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment