Use recursion in the solution.I would really appreciate if you can help me to find a better way to do it.public class AppendCharacterAfterEachCharacterInString{    int index =0;    StringBuilder outputString = new StringBuilder();    public string AppendInputCharacterAfterEachCharacterInString(string sInputString, string inputRepeatCharacter)    {                    if (string.IsNullOrEmpty(sInputString))        {            Console.WriteLine(Empty string !);        }        else        {            BuildNewString(sInputString, inputRepeatCharacter);        }        return outputString.ToString();    }    private void BuildNewString(string inputString, string repeatCharacter)    {        if (index < inputString.Length)        {             outputString.Append(inputString[index]);            if(!(inputString[index].ToString().Trim() == string.Empty) && !(index + 1 == inputString.Length))              outputString.Append(repeatCharacter);                              index++;            BuildNewString(inputString, repeatCharacter);          }    }
A method which, given a string, returns a string in which each character is separated by an asterisk
c#;strings