Driver code
public static void Main ( String [ ] args ) { String str = " batman " ; char X = ' a ' , Y = ' d ' , Z = ' b ' ; str = replaceRemove ( str . ToCharArray ( ) , X , Y , Z ) ; if ( str . Length == 0 ) { Console . WriteLine ( - 1 ) ; } else { Console . WriteLine ( str ) ; } } }