The issue is the way strings are stored in C#. While in some languages it takes computation to figure out how long a string is, in C#, the only way to figure out the length of a string is through its Length property. If you thing about how strings are stored, there is an array of character, and a Length. Now, the strings are not null-terminated, so you need the Length field to know how much of the array you can access before you start reading memory that isn't part of the array. You can hide what you are doing through abstraction though. For example you can call the ToCharArray function, but in order to generate the null-terminated string which you use, it first has to access the Length value to allocated the right amount of memory for the char[] array and copy the right amount of characters. Or you could use a
for each (char c in s) length++;
as somebody else suggested. This is another way to hide the fact you are accessing the Length value. In order to iterate over the characters in this way, you must first access the Length value to see how many characters you are iterating over. Whether it does this in a library call, or it compiles it away to a different construct, I am not sure, but the end result is the same.