Muhammad Hammad
✅ GetLength vs .Length
ty man I had a wrong understanding before previosly when I worked on a words counter
userInput.Length gives you the total number of characters in the userInput string.
In C#, strings are zero-indexed, meaning the first character is at index 0, and the last character is at index userInput.Length - 1.
So I just mixed this everywhere thinking it's needed at all place
12 replies