-
-
Save lgolubyev/19a508b49bce60d3bd4665fe7f1c276d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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