Click here to Skip to main content
15,886,518 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: What/where is the "UtilityLibrary" Pin
Luc Pattyn9-Jun-09 3:50
sitebuilderLuc Pattyn9-Jun-09 3:50 
GeneralRe: What/where is the "UtilityLibrary" Pin
berntie9-Jun-09 4:07
berntie9-Jun-09 4:07 
QuestionMultiple recursion & recursion? Pin
Ali_1008-Jun-09 23:54
Ali_1008-Jun-09 23:54 
AnswerRe: Multiple recursion & recursion? Pin
molesworth9-Jun-09 1:04
molesworth9-Jun-09 1:04 
GeneralRe: Multiple recursion & recursion? Pin
kanagarajm3-May-10 7:31
kanagarajm3-May-10 7:31 
AnswerRe: Multiple recursion & recursion? Pin
Colin Angus Mackay9-Jun-09 1:54
Colin Angus Mackay9-Jun-09 1:54 
AnswerRe: Multiple recursion & recursion? Pin
Luc Pattyn9-Jun-09 2:35
sitebuilderLuc Pattyn9-Jun-09 2:35 
AnswerRe: Multiple recursion & recursion? Pin
supercat99-Jun-09 7:02
supercat99-Jun-09 7:02 
Any recursive algorithm can be implemented using non-recursive code if one maintains one's own stack to hold intermediate results. In many cases, however, recursive code can be more efficient and readable. For example, if one has a tree structure which represents an expression (each either holds a value, or else an operation and up to two operands which will yield a value) one may very easily define something like (ignoring the constructor and various other things):
Class Plus
  Inherits OpNode
  Dim LeftOp, RightOp as OpNode
  Function Eval as Double
    Return LeftOp.Eval + RightOp.Eval
  End Function
  End Class

While there would be ways to handle such things non-recursively, they would be decidedly awkward. Recursion allows things to be handled very smoothly. If one would be worried about stack overflow, one could do something like:
Class Plus
  Inherits OpNode
  Dim LeftOp, RightOp as OpNode
  Function Eval(MaxDepth as Integer) as Double
    If MaxDepth < 0 then Throw New WhateverException("Expression too complicated")
    Return LeftOp.Eval(MaxDepth-1) + RightOp.Eval(MaxDepth-1)
  End Function
  End Class

Still much nicer than maintaining a "to-do list" manually.
AnswerRe: Multiple recursion & recursion? Pin
Baran M10-Jun-09 2:18
Baran M10-Jun-09 2:18 
AnswerRe: Multiple recursion & recursion? Pin
Pascal Ganaye10-Jun-09 2:28
Pascal Ganaye10-Jun-09 2:28 
GeneralTOols of testings Pin
Ali_1008-Jun-09 23:53
Ali_1008-Jun-09 23:53 
GeneralRe: TOols of testings Pin
Simon P Stevens9-Jun-09 0:46
Simon P Stevens9-Jun-09 0:46 
GeneralRe: TOols of testings Pin
Colin Angus Mackay9-Jun-09 1:57
Colin Angus Mackay9-Jun-09 1:57 
GeneralRe: TOols of testings Pin
Pete O'Hanlon9-Jun-09 2:19
mvePete O'Hanlon9-Jun-09 2:19 
GeneralRe: TOols of testings Pin
Eddy Vluggen9-Jun-09 7:37
professionalEddy Vluggen9-Jun-09 7:37 
GeneralMultiple inheritance Pin
Ali_1008-Jun-09 23:52
Ali_1008-Jun-09 23:52 
GeneralRe: Multiple inheritance Pin
Simon P Stevens9-Jun-09 0:39
Simon P Stevens9-Jun-09 0:39 
GeneralRe: Multiple inheritance Pin
supercat99-Jun-09 12:50
supercat99-Jun-09 12:50 
GeneralRe: Multiple inheritance Pin
Baran M9-Jun-09 1:38
Baran M9-Jun-09 1:38 
GeneralRe: Multiple inheritance Pin
Colin Angus Mackay9-Jun-09 1:47
Colin Angus Mackay9-Jun-09 1:47 
Questionremoting and client devices that switch network cards on the fly Pin
Martijn van Kleef8-Jun-09 22:08
Martijn van Kleef8-Jun-09 22:08 
QuestionGet message "keyset does not exist" when attempting to publish Pin
swampwiz7-Jun-09 13:28
swampwiz7-Jun-09 13:28 
AnswerRe: Get message "keyset does not exist" when attempting to publish Pin
Mark Salsbery8-Jun-09 12:36
Mark Salsbery8-Jun-09 12:36 
GeneralRe: Get message "keyset does not exist" when attempting to publish Pin
swampwiz8-Jun-09 14:18
swampwiz8-Jun-09 14:18 
GeneralRe: Get message "keyset does not exist" when attempting to publish Pin
Mark Salsbery8-Jun-09 14:25
Mark Salsbery8-Jun-09 14:25 

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.