I have a string as input and have to break the string in two substrings. If the left substring equals the right substring then do some logic.
How can I do this?
int length = myString.Length; for (int i = 0; i < length / 2; i++) { if (myString[i] != myString[length - i - 1]) return false; } return true;