Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Created June 24, 2022 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgolubyev/19a508b49bce60d3bd4665fe7f1c276d to your computer and use it in GitHub Desktop.
Save lgolubyev/19a508b49bce60d3bd4665fe7f1c276d to your computer and use it in GitHub Desktop.
private struct Enumerator
{
private readonly KeyValuePair<string, object>[] source;
private int index;
public Enumerator(KeyValuePair<string, object>[] source)
{
this.source = source;
this.index = -1;
}
public readonly KeyValuePair<string, object> Current => this.source[this.index];
public readonly Enumerator GetEnumerator() => this;
public bool MoveNext()
{
return ++this.index < this.source.Length;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment