Why you cannot use an unsafe keyword in an iterator context?
Eric Lippert has an excellent blog post on this topic here: Iterator Blocks, Part Six: Why no unsafe code?
What I want to know is why you would use pointers for this at all. Why not simply say:
private IEnumerator<char> ReverseRead()
{
int len = _str.Length;
for(int i = 0; i < len; ++i)
yield return _str[len - i - 1];
}
What's the compelling benefit of messing around with pointers?