Quantcast
Viewing latest article 3
Browse Latest Browse All 6

Answer by b1nary_atr0phy

Is there a particular reason you are using `yield return` as opposed to simply `return`? A method using `yield return` must be declared as returning one of the following two interfaces: `IEnumerable` or `IEnumerator` *Example:* public IEnumerable YourMethod() { foreach (XElement header in headersXml.Root.Elements()) { yield return (ParseHeader(header)); } } So there is a difference between `return` and `yield return`, and you need to declare the method correctly.

Viewing latest article 3
Browse Latest Browse All 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>