If the current and the previous characters are not in the same case then take the character
if ( char . IsUpper ( s [ i ] ) && char . IsLower ( s [ i - 1 ] ) || char . IsLower ( s [ i ] ) && char . IsUpper ( s [ i - 1 ] ) ) modifiedStr += s [ i ] ; } return modifiedStr ; }