Click here to Skip to main content
15,890,186 members
Home / Discussions / C#
   

C#

 
AnswerRe: can anyone help me out here with the tutorials of c# classes and arrays and strings as well as exception handling Pin
#realJSOP23-Aug-11 5:23
mve#realJSOP23-Aug-11 5:23 
Questionhelp me Pin
daniel_leto2322-Aug-11 18:09
daniel_leto2322-Aug-11 18:09 
AnswerRe: help me Pin
thatraja22-Aug-11 18:22
professionalthatraja22-Aug-11 18:22 
AnswerRe: help me Pin
daniel_leto2322-Aug-11 18:33
daniel_leto2322-Aug-11 18:33 
GeneralRe: help me Pin
Not Active22-Aug-11 19:01
mentorNot Active22-Aug-11 19:01 
AnswerRe: help me PinPopular
RobCroll22-Aug-11 19:09
RobCroll22-Aug-11 19:09 
GeneralRe: help me Pin
Smithers-Jones22-Aug-11 20:58
Smithers-Jones22-Aug-11 20:58 
QuestionStackOverflowException Pin
abolfazl delbari22-Aug-11 13:08
abolfazl delbari22-Aug-11 13:08 
This method return "StackOverflowException" error for some inputs;like 12.
where is Infinite loop point?
C#
public void cycle(int f){
           int i, j;
           if (f == 0)
               return;
           else
           {
               for (i = f; i >= 0; i--)
               {
                   for (j = 0; j <= 10; j++)
                   {
                       if (i == Math.Pow(2, j))
                       {
                           f = f - (int)Math.Pow(2, j);
                           switch (j)
                           {
                               case 1:
                                   cbx1.Checked = true;
                                   break;
                               case 2:
                                   cbx2.Checked = true;
                                   break;
                               case 3:
                                   cbx3.Checked = true;
                                   break;
                               case 4:
                                   cbx4.Checked = true;
                                   break;
                               case 5:
                                   cbx5.Checked = true;
                                   break;
                               case 6:
                                   cbx6.Checked = true;
                                   break;
                               case 7:
                                   cbx7.Checked = true;
                                   break;
                               case 8:
                                   cbx8.Checked = true;
                                   break;
                               case 9:
                                   cbx9.Checked = true;
                                   break;
                               case 10:
                                   cbx10.Checked = true;
                                   break;
                           }
                           break;
                       }
                   }
               }
       cycle(f);
       }
   }

AnswerRe: StackOverflowException [modified] PinPopular
Luc Pattyn22-Aug-11 13:32
sitebuilderLuc Pattyn22-Aug-11 13:32 
GeneralRe: StackOverflowException Pin
abolfazl delbari22-Aug-11 14:48
abolfazl delbari22-Aug-11 14:48 
AnswerRe: StackOverflowException Pin
Luc Pattyn22-Aug-11 15:23
sitebuilderLuc Pattyn22-Aug-11 15:23 
SuggestionRe: StackOverflowException Pin
lukeer22-Aug-11 20:46
lukeer22-Aug-11 20:46 
AnswerRe: StackOverflowException [modified] Pin
Luc Pattyn23-Aug-11 1:47
sitebuilderLuc Pattyn23-Aug-11 1:47 
GeneralRe: StackOverflowException Pin
PIEBALDconsult23-Aug-11 3:13
mvePIEBALDconsult23-Aug-11 3:13 
AnswerRe: StackOverflowException Pin
Luc Pattyn23-Aug-11 3:28
sitebuilderLuc Pattyn23-Aug-11 3:28 
GeneralRe: StackOverflowException Pin
PIEBALDconsult23-Aug-11 3:34
mvePIEBALDconsult23-Aug-11 3:34 
QuestionRe: StackOverflowException Pin
Luc Pattyn23-Aug-11 5:46
sitebuilderLuc Pattyn23-Aug-11 5:46 
AnswerRe: StackOverflowException Pin
PIEBALDconsult23-Aug-11 14:16
mvePIEBALDconsult23-Aug-11 14:16 
GeneralRe: StackOverflowException Pin
GParkings1-Sep-11 7:35
GParkings1-Sep-11 7:35 
GeneralRe: StackOverflowException Pin
Luc Pattyn1-Sep-11 8:11
sitebuilderLuc Pattyn1-Sep-11 8:11 
JokeRe: StackOverflowException Pin
PIEBALDconsult22-Aug-11 14:47
mvePIEBALDconsult22-Aug-11 14:47 
GeneralRe: StackOverflowException Pin
abolfazl delbari22-Aug-11 15:00
abolfazl delbari22-Aug-11 15:00 
Questionvirtual USB device Pin
Grimes22-Aug-11 11:03
Grimes22-Aug-11 11:03 
AnswerRe: virtual USB device Pin
Rutvik Dave22-Aug-11 11:26
professionalRutvik Dave22-Aug-11 11:26 
GeneralRe: virtual USB device Pin
Grimes22-Aug-11 11:41
Grimes22-Aug-11 11:41 

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.