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?
public static bool getStatus(string myString) { string first = myString.Substring(0, myString.Length / 2); char[] arr = myString.ToCharArray(); Array.Reverse(arr); string temp = new string(arr); string second = temp.Substring(0, temp.Length / 2); return first.Equals(second); }