Skip to content

Instantly share code, notes, and snippets.

@jcotton42
Created February 5, 2018 00:45
Show Gist options
  • Save jcotton42/3392cb8d3310d3e0601d5eb1186ec2e9 to your computer and use it in GitHub Desktop.
Save jcotton42/3392cb8d3310d3e0601d5eb1186ec2e9 to your computer and use it in GitHub Desktop.
void Main() {
var s = new S();
foreach (var x in s) {}
}
struct S {
public SpanSplitEnumerator GetEnumerator() => new SpanSplitEnumerator();
}
ref struct SpanSplitEnumerator {
public Span<char> Current => throw new NotImplementedException();
public void Dispose() { }
public bool MoveNext() {
throw new NotImplementedException();
}
public void Reset() {
throw new NotImplementedException();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment