Click here to Skip to main content
16,015,094 members
Home / Discussions / C#
   

C#

 
GeneralRe: recurse an anonymous method Pin
urbane.tiger10-Dec-06 14:26
urbane.tiger10-Dec-06 14:26 
GeneralRe: recurse an anonymous method Pin
Judah Gabriel Himango10-Dec-06 14:29
sponsorJudah Gabriel Himango10-Dec-06 14:29 
GeneralRe: recurse an anonymous method Pin
urbane.tiger10-Dec-06 14:43
urbane.tiger10-Dec-06 14:43 
GeneralRe: recurse an anonymous method Pin
Judah Gabriel Himango10-Dec-06 14:50
sponsorJudah Gabriel Himango10-Dec-06 14:50 
AnswerRe: recurse an anonymous method Pin
Guffa10-Dec-06 18:11
Guffa10-Dec-06 18:11 
GeneralRe: recurse an anonymous method Pin
urbane.tiger11-Dec-06 16:06
urbane.tiger11-Dec-06 16:06 
GeneralRe: recurse an anonymous method Pin
Guffa11-Dec-06 20:33
Guffa11-Dec-06 20:33 
GeneralRe: recurse an anonymous method Pin
urbane.tiger12-Dec-06 14:57
urbane.tiger12-Dec-06 14:57 
public someClass
{
public double methodOne(int arg1, List<double> arg2)
{
float number = Math.Sqrt(arg1)
double answer;

arg2.ForEach(delegate{double itemVal)
{
answer += (arg1 < 0) ? extClass.Meth1(this, itemVal, arg1) : extClass.Meth2(this. itemVal, arg1);
}
}
}

public class extClass
{
public double Meth1(someClass mySomeClass, double value, int order)
{
blah blah
double var = mySomeClass.MethodOne(myInt, myListDoubles)
}
}

Surely there is some sort of recursion happening here. I call it indirect recursion - as a result of MethodOne being indirectly recursed then so too is the Action delegate within MethodOne. If I wanted to prevent this I would have MethodOne examine the stack to determine if it, itself, has a prior entry and to react accordingly (it might raise an Exception or simply return zero). If I did not detect recursion and do something about it at the top of the method then I say that MethodOne, including the anon methods therein, are in a state of recursion.


AnswerRe: recurse an anonymous method Pin
Guffa12-Dec-06 21:11
Guffa12-Dec-06 21:11 
GeneralRe: recurse an anonymous method Pin
urbane.tiger17-Dec-06 13:57
urbane.tiger17-Dec-06 13:57 
JokeRe: recurse an anonymous method Pin
Muammar©10-Dec-06 20:23
Muammar©10-Dec-06 20:23 
AnswerRe: recurse an anonymous method Pin
Judah Gabriel Himango9-Feb-07 8:11
sponsorJudah Gabriel Himango9-Feb-07 8:11 
GeneralRe: recurse an anonymous method Pin
urbane.tiger11-Feb-07 13:42
urbane.tiger11-Feb-07 13:42 
AnswerRe: Making a callback an instance member function... Pin
Judah Gabriel Himango10-Dec-06 13:36
sponsorJudah Gabriel Himango10-Dec-06 13:36 
QuestionBindingSource and DataSet Pin
mfcuser10-Dec-06 9:24
mfcuser10-Dec-06 9:24 
AnswerRe: BindingSource and DataSet Pin
User 171649210-Dec-06 13:28
professionalUser 171649210-Dec-06 13:28 
AnswerRe: BindingSource and DataSet Pin
Muammar©10-Dec-06 20:16
Muammar©10-Dec-06 20:16 
QuestionProject Installer - Installing Fonts? Pin
wbjohnson10-Dec-06 7:19
wbjohnson10-Dec-06 7:19 
AnswerRe: Project Installer - Installing Fonts? Pin
Filip van der Meeren10-Dec-06 9:16
Filip van der Meeren10-Dec-06 9:16 
GeneralRe: Project Installer - Installing Fonts? Pin
wbjohnson10-Dec-06 9:19
wbjohnson10-Dec-06 9:19 
GeneralRe: Project Installer - Installing Fonts? [modified] Pin
Filip van der Meeren10-Dec-06 9:25
Filip van der Meeren10-Dec-06 9:25 
GeneralRe: Project Installer - Installing Fonts? Pin
wbjohnson10-Dec-06 9:29
wbjohnson10-Dec-06 9:29 
Questiongetting the values from unbound DatagridviewcomboBoxColumns ??? Pin
Rocky#10-Dec-06 7:05
Rocky#10-Dec-06 7:05 
Questionruning a *.exe file Pin
hadad10-Dec-06 6:54
hadad10-Dec-06 6:54 
AnswerRe: runing a *.exe file Pin
gnadeem10-Dec-06 7:10
gnadeem10-Dec-06 7:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.