In my everlasting quest to suck less I\'m trying to understand the \"yield\" statement, but I keep encountering the same error.
The body of [someMetho
What does the method you're using this in look like? I don't think this can be used in just a loop by itself.
For example...
public IEnumerable GetValues() { foreach(string value in someArray) { if (value.StartsWith("A")) { yield return value; } } }