Quantcast
Channel: Answers for "How to fix my code? (Player death + Respawn)"
Viewing all articles
Browse latest Browse all 6

Answer by b1nary_atr0phy

$
0
0
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 all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images