Hello,
just a question; I need to do recurion on a sort of tree but I need to use 'yield' keyword as well. But recursion it seems don't work:
public IEnumerable compute(string query, string s) {
foreach (string s in Coll) {
query = .........................;
if () yield return compute(query, s);
}
}
This is a pseudo-code of course; I wonder if womething wrong in what I'm trying to do...
thanks
Recursion
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Nilanka DharmadasaRank #1,875 · 794 reputationPosted Nov 13, 2009, 12:44 AM EST
As I understand, you are not using the parametrs passed into the method. You are just using some fixed values defined inside the method. So, a recursion will not occur.
I cant be 100% sure about my answer as this pseudo code is not exactly clear for me.