Click here to Skip to main content
15,887,596 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to find the Content datatype in a String Pin
Guffa1-Aug-08 23:35
Guffa1-Aug-08 23:35 
QuestionThe reason behind the differences of this.Font = fontdialog1.Font and btnTest.Font Pin
Lim Yuxuan1-Aug-08 18:37
Lim Yuxuan1-Aug-08 18:37 
AnswerRe: The reason behind the differences of this.Font = fontdialog1.Font and btnTest.Font Pin
Gideon Engelberth2-Aug-08 2:12
Gideon Engelberth2-Aug-08 2:12 
GeneralRe: The reason behind the differences of this.Font = fontdialog1.Font and btnTest.Font Pin
Lim Yuxuan2-Aug-08 4:56
Lim Yuxuan2-Aug-08 4:56 
QuestionAdd rular in toolbar Pin
amitshan1-Aug-08 18:13
amitshan1-Aug-08 18:13 
AnswerRe: Add rular in toolbar Pin
Krazy Programmer1-Aug-08 22:13
Krazy Programmer1-Aug-08 22:13 
AnswerRe: Add rular in toolbar Pin
Paul Conrad2-Aug-08 10:29
professionalPaul Conrad2-Aug-08 10:29 
QuestionRegex Match counting problem Pin
Mohammad A Gdeisat1-Aug-08 17:06
Mohammad A Gdeisat1-Aug-08 17:06 
AnswerRe: Regex Match counting problem Pin
User 66582-Aug-08 0:56
User 66582-Aug-08 0:56 
GeneralRe: Regex Match counting problem Pin
Mohammad A Gdeisat2-Aug-08 0:59
Mohammad A Gdeisat2-Aug-08 0:59 
GeneralRe: Regex Match counting problem [modified] Pin
User 66582-Aug-08 1:08
User 66582-Aug-08 1:08 
AnswerRe: Regex Match counting problem Pin
Gideon Engelberth2-Aug-08 2:22
Gideon Engelberth2-Aug-08 2:22 
QuestionLabel Text Pin
nelsonpaixao1-Aug-08 14:13
nelsonpaixao1-Aug-08 14:13 
AnswerRe: Label Text Pin
MarkB7771-Aug-08 14:45
MarkB7771-Aug-08 14:45 
AnswerRe: Label Text Pin
DaveyM691-Aug-08 21:13
professionalDaveyM691-Aug-08 21:13 
AnswerRe: Label Text Pin
Thomas Stockwell2-Aug-08 7:34
professionalThomas Stockwell2-Aug-08 7:34 
QuestionHow to use Queue.Synchronized Pin
JoeRip1-Aug-08 13:58
JoeRip1-Aug-08 13:58 
AnswerRe: How to use Queue.Synchronized Pin
Mark Salsbery1-Aug-08 14:27
Mark Salsbery1-Aug-08 14:27 
GeneralRe: How to use Queue.Synchronized Pin
JoeRip1-Aug-08 15:02
JoeRip1-Aug-08 15:02 
GeneralRe: How to use Queue.Synchronized Pin
Mark Salsbery1-Aug-08 15:12
Mark Salsbery1-Aug-08 15:12 
QuestionDataGridView Navigation (i bet it´s easy) Pin
nelsonpaixao1-Aug-08 13:29
nelsonpaixao1-Aug-08 13:29 
QuestionHow do I make this code display the contents of the stack at the top of the text box.? Pin
Angelinna1-Aug-08 12:15
Angelinna1-Aug-08 12:15 
AnswerRe: How do I make this code display the contents of the stack at the top of the text box.? Pin
Guffa1-Aug-08 12:51
Guffa1-Aug-08 12:51 
GeneralRe: How do I make this code display the contents of the stack at the top of the text box.? Pin
Angelinna1-Aug-08 13:54
Angelinna1-Aug-08 13:54 
GeneralRe: How do I make this code display the contents of the stack at the top of the text box.? Pin
Lim Yuxuan1-Aug-08 17:53
Lim Yuxuan1-Aug-08 17:53 
private void displayStack()
{
string nextItem;

displayBox.Clear();

// doing it the other way like guffa said
for (int i = stacktop; i >= 0; i--)
{
nextItem = stackArray[i].ToString();
displayBox.AppendText(nextItem);
displayBox.AppendText("\n");
}
}

instead of starting from bottom value of your stack,(originally your intial conditon is int i = 0) you are now starting at the max value of your stack.

Instead of stopping the loop when your variable "i" reaches "stacktop" (top of your stack), the loop stopped at "i = 0"(bottom of your stack).

Because of the above 2 statements, i++ have to change to i-- since you are starting from top to bottom now.

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.