Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / recursion

Recursion

recursion

Great Reads

by Michael D Bray
Filling in text templates from a data source.
by Herre Kuijpers
A utility that allows you to enter simple and more complex mathematical formulas which will be evaluated and calculated on the spot
by Redslide
Modify MVC Routing to allow routes such as /Electronics/Software/Operating-Systems/PC/Windows-8-Installer
by Eric Z (Jing)
Evaluation order matters!

Latest Articles

by Michael D Bray
Filling in text templates from a data source.
by Herre Kuijpers
A utility that allows you to enter simple and more complex mathematical formulas which will be evaluated and calculated on the spot
by Redslide
Modify MVC Routing to allow routes such as /Electronics/Software/Operating-Systems/PC/Windows-8-Installer
by Eric Z (Jing)
Evaluation order matters!

All Articles

Sort by Score

recursion 

by Redslide
Modify MVC Routing to allow routes such as /Electronics/Software/Operating-Systems/PC/Windows-8-Installer
by brunofer2007
Easy way to sort nodes in a TreeView using a recursive function.
by Jobless Creature
CTE To find all the related nodes in a hierarcy
by Normz Antonino
This tip shows you how to convert numbers to words neatly.
by JasonDove
I hate sub reports and always consider them the last resort in any reporting solution. The negative effect on performance and maintainability is just not worth the easy ride they give the report writer. Nine times out of ten reporting requirements can be met using a little forethought and...
by jarvisa
public void ControlStatus(Control control, bool isDisable){ foreach (Control c in control.Controls) if (c.HasControls()) ControlStatus(c, isDisable); else { WebControl wc = c as WebControl; if (wc != null) ...
by PSU Steve
You can just use "not IsDisable" versus the IF...ELSE block. Additionally, the recursive call to ControlStatus should be done all the time so that the parent control is enabled/disabled along with the children. // to enable\disable the control & its child controls public...
by a_pess
Alternative For VB.NET Windows Forms Private Sub ControlEnabled(ByVal ctrl As Control, ByVal isDisable As Boolean) Me.ControlEnabled(ctrl, isDisable, True) End Sub Private Sub ControlEnabled(ByVal ctrl As Control, ByVal isDisable As Boolean, ByVal allowRecurse As...
by atamata
File renaming algorith to mimic Windows copy+paste renaming
by Kabwla.Phone
Ha! I get it....I am actually using an adaptation of this technique in production code.But the adapted code required a dept-first search and this original pattern is width-first.Which brings us these new and improved versions:public static List FindControlsWidthFirst( Control...
by Kabwla.Phone
Implemented with a queue and some newfangled yields.Since a queue does not have an 'EnqueueRange', we will still have to do a loop. Of course, enqueue range would be a nice extension method.Excusing the overhead created by the yield, this might use less memory if there are many controls. (Or...
by discompsys
This tutorial describes how to convert the recursive method call in said algorithm into a flat loop call, to save memory in restricted environments.
by Viktor Kovács
A simple solution for processing spaceless strings
by Stefan Huy
How to iterate recursively through all menu items in a menuStrip Control
by Qadeer Ahmed Khan
This tip explains how you can iterate through all ToolStripMenuItems of a menu strip.
by Veselin Tenev
Provides simplistic solution to a recursive MySQL table
by Sitang Ruan
How to make a sequential Ajax call
by Magnus_
An extension method to the IEnumerable`1 interface that can select all children recursively of an entity in a tree like structure
by John Adams
Magnus, I really like the idea! I believe your original idea (posted @ http://www.codeproject.com/KB/linq/LinqToTree.aspx) is even better for the general case - probably better than the solution in the article - it does feel more generic while still being very easy to use.I'm sure you may...
by Mehdy Moini
Implementing a map as a tree, and finding the shortest path, between the streets, is what you will see.
by Anish M
CREATE PROC GetChildNodes (@ID uniqueidentifier)ASBEGINWITH PermissionList (PermissionID, PermissionName, Level)AS(SELECT ap.PermissionID, ap.PermissionName, 0 AS LevelFROM Permission AS apWHERE PermissionID = @IDUNION ALLSELECT ap.PermissionID, ap.PermissionName, Level + 1FROM
by Subhendu Sekhar Behera
Algorithm to find out all the Matchings and Uniquely Restricted Matchings in a Graph
by IssamK
How to automatically generate classes for your database tables