Skip to content

Instantly share code, notes, and snippets.

@dicenull
Last active December 7, 2018 13:39
Show Gist options
  • Save dicenull/11a7d5955e03e4a393bdd21c72ee8d69 to your computer and use it in GitHub Desktop.
Save dicenull/11a7d5955e03e4a393bdd21c72ee8d69 to your computer and use it in GitHub Desktop.
YieldReturn
public IEnumerable<Dictionary<string, string>> ReadCsv()
{
var tweet = reader.Read();
if(tweet == null)
{
break;
}
for (int i = 0; i < Keys.Length; i++)
{
yield return (Keys[i], tweet[i]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment