Click here to Skip to main content
15,904,024 members
Home / Discussions / C#
   

C#

 
GeneralRe: Simple Unzip of zip file containing multiple files and folders Pin
arun_pk4-Jan-11 22:27
arun_pk4-Jan-11 22:27 
GeneralRe: Simple Unzip of zip file containing multiple files and folders Pin
RaviRanjanKr4-Jan-11 23:37
professionalRaviRanjanKr4-Jan-11 23:37 
QuestionMessage Removed Pin
4-Jan-11 19:34
Sharath Hanakere4-Jan-11 19:34 
AnswerRe: Create a Sitemap User Control by using Recursion Pin
OriginalGriff4-Jan-11 20:36
mveOriginalGriff4-Jan-11 20:36 
GeneralRe: Create a Sitemap User Control by using Recursion Pin
Sharath Hanakere4-Jan-11 20:55
Sharath Hanakere4-Jan-11 20:55 
GeneralRe: Create a Sitemap User Control by using Recursion Pin
OriginalGriff4-Jan-11 20:57
mveOriginalGriff4-Jan-11 20:57 
GeneralMessage Removed Pin
4-Jan-11 22:12
Sharath Hanakere4-Jan-11 22:12 
GeneralRe: Create a Sitemap User Control by using Recursion Pin
OriginalGriff4-Jan-11 22:35
mveOriginalGriff4-Jan-11 22:35 
Couple of things:
1) When you post code fragments, use the "code block" widget not the "inline code" (That way you get <pre> tags instead of <code> tags. This preserves your formatting
inline code:
string SubUlHTML = "";<br />
if (node.HasChildNodes)<br />
{<br />
SubUlHTML = "<ul>";<br />
foreach (SiteMapNode childnode in node.ChildNodes)<br />
{<br />
SubUlHTML += GetNodeHTML(childnode);


code block:
string SubUlHTML = "";
if (node.HasChildNodes)
   {
   SubUlHTML = "<ul>";
   foreach (SiteMapNode childnode in node.ChildNodes)
      {
      SubUlHTML += GetNodeHTML(childnode);
Which would you rather read? Laugh | :laugh:

2) Looping isn't recursion. Recursion: See "Recursion".
For example: Factorials
In mathematics, the factorial of a positive integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example,
5! = 5 x 4 x 3 x 2 x 1
0! is a special case that is explicitly defined to be 1.

Another way to write that is n! = n * (n-1)! while n > 1

To code this:
private int Factorial (int n)
   {
   if (n < 0)
      {
      throw new ArgumentException("Factorial not defined for negative numbers");
      }
   if (n == 0)
      {
      return 1;  // Special case : 0! is defined to be one
      }
   return n * Factorial(n - 1);
   }


Do you see the difference between that an a loop? If not, think about it. This is important!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

QuestionRe: Create a Sitemap User Control by using Recursion Pin
JacquesDP5-Jan-11 2:38
JacquesDP5-Jan-11 2:38 
AnswerRe: Create a Sitemap User Control by using Recursion Pin
OriginalGriff5-Jan-11 2:51
mveOriginalGriff5-Jan-11 2:51 
GeneralRe: Create a Sitemap User Control by using Recursion Pin
JacquesDP5-Jan-11 2:57
JacquesDP5-Jan-11 2:57 
AnswerRe: Create a Sitemap User Control by using Recursion Pin
Abhinav S4-Jan-11 20:51
Abhinav S4-Jan-11 20:51 
QuestionUsing rdpsign.exe with c sharp and where to get it Pin
turbosupramk34-Jan-11 12:52
turbosupramk34-Jan-11 12:52 
AnswerRe: Using rdpsign.exe with c sharp and where to get it Pin
Dave Kreskowiak4-Jan-11 16:15
mveDave Kreskowiak4-Jan-11 16:15 
GeneralRe: Using rdpsign.exe with c sharp and where to get it [modified] Pin
turbosupramk34-Jan-11 16:41
turbosupramk34-Jan-11 16:41 
QuestionCreate a new additional function to use with Cristal Report (VS2005) Pin
martinergb4-Jan-11 7:02
martinergb4-Jan-11 7:02 
Questiondatagridview cell type Pin
csrss4-Jan-11 6:23
csrss4-Jan-11 6:23 
AnswerRe: datagridview cell type Pin
Dave Kreskowiak4-Jan-11 6:40
mveDave Kreskowiak4-Jan-11 6:40 
GeneralRe: datagridview cell type Pin
csrss4-Jan-11 7:02
csrss4-Jan-11 7:02 
AnswerRe: datagridview cell type Pin
Luc Pattyn4-Jan-11 7:01
sitebuilderLuc Pattyn4-Jan-11 7:01 
GeneralRe: datagridview cell type Pin
csrss4-Jan-11 7:04
csrss4-Jan-11 7:04 
QuestionDebug.Trace - wish it to act like ASSERT in MFC Pin
bob169724-Jan-11 6:05
bob169724-Jan-11 6:05 
AnswerRe: Debug.Trace - wish it to act like ASSERT in MFC Pin
Dave Kreskowiak4-Jan-11 6:36
mveDave Kreskowiak4-Jan-11 6:36 
GeneralRe: Debug.Trace - wish it to act like ASSERT in MFC Pin
bob169724-Jan-11 6:42
bob169724-Jan-11 6:42 
AnswerRe: Debug.Trace - wish it to act like ASSERT in MFC Pin
Rob Philpott4-Jan-11 6:46
Rob Philpott4-Jan-11 6:46 

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.