Skip to content

Instantly share code, notes, and snippets.

@christiannagel
Last active July 22, 2017 07:10
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 christiannagel/1ba7b595922a4f6f0e312ea89073fec5 to your computer and use it in GitHub Desktop.
Save christiannagel/1ba7b595922a4f6f0e312ea89073fec5 to your computer and use it in GitHub Desktop.
ArgumentNullException with yield
string[] names = { "James", "Niki", "John", "Gerhard", "Jack" };
var q = names.Where(null);
foreach (var n in q) // callstack position for exception
{
Console.WriteLine(n);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment