Observing the System.String
class in ILSpy
I found the following indexer:
public extern char this[int index]
{
[__DynamicallyInvokable, SecuritySafeCritical]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
This indexer retieves the char from string by index and restricts its setter (making it immutable, I suppose). But how does this getter works? Where does it retieves the char from? And how does the debugger automaticaly implement this indexer getter?