Click here to Skip to main content
15,920,217 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to sort a big volume of data? Pin
Thomas Krojer2-Sep-07 22:46
Thomas Krojer2-Sep-07 22:46 
GeneralRe: How to sort a big volume of data? Pin
michal.kreslik3-Sep-07 6:06
michal.kreslik3-Sep-07 6:06 
GeneralRe: How to sort a big volume of data? Pin
Thomas Krojer3-Sep-07 23:49
Thomas Krojer3-Sep-07 23:49 
GeneralRe: How to sort a big volume of data? Pin
michal.kreslik4-Sep-07 0:10
michal.kreslik4-Sep-07 0:10 
GeneralRe: How to sort a big volume of data? Pin
Thomas Krojer18-Sep-07 23:00
Thomas Krojer18-Sep-07 23:00 
GeneralRe: How to sort a big volume of data? Pin
michal.kreslik18-Sep-07 23:17
michal.kreslik18-Sep-07 23:17 
GeneralRe: How to sort a big volume of data? Pin
Thomas Krojer19-Sep-07 0:31
Thomas Krojer19-Sep-07 0:31 
Questiondynamically creating forms from db Pin
algoaddict29-Aug-07 4:53
algoaddict29-Aug-07 4:53 
Questionword document to xml document Pin
sk840529-Aug-07 4:43
sk840529-Aug-07 4:43 
AnswerRe: word document to xml document Pin
led mike29-Aug-07 5:10
led mike29-Aug-07 5:10 
JokeRe: word document to xml document Pin
Spacix One29-Aug-07 8:28
Spacix One29-Aug-07 8:28 
AnswerRe: word document to xml document Pin
ekynox29-Aug-07 21:43
ekynox29-Aug-07 21:43 
QuestionHow to treat with treeview check box Pin
huss Aldin29-Aug-07 3:29
huss Aldin29-Aug-07 3:29 
AnswerRe: How to treat with treeview check box Pin
I Believe In GOD29-Aug-07 11:00
I Believe In GOD29-Aug-07 11:00 
QuestionPrint to POS Printer on serial port Pin
Tavbi29-Aug-07 3:00
Tavbi29-Aug-07 3:00 
AnswerRe: Print to POS Printer on serial port Pin
originSH29-Aug-07 3:28
originSH29-Aug-07 3:28 
GeneralRe: Print to POS Printer on serial port Pin
Tavbi29-Aug-07 19:57
Tavbi29-Aug-07 19:57 
AnswerRe: Print to POS Printer on serial port Pin
martin_hughes29-Aug-07 6:58
martin_hughes29-Aug-07 6:58 
GeneralRe: Print to POS Printer on serial port Pin
Tavbi29-Aug-07 20:27
Tavbi29-Aug-07 20:27 
QuestionTab Page Tab_handfold Size Pin
greekius29-Aug-07 2:08
greekius29-Aug-07 2:08 
AnswerRe: Tab Page Tab_handfold Size Pin
goldoche29-Aug-07 2:25
goldoche29-Aug-07 2:25 
Questionmultiple loops Pin
suck12329-Aug-07 1:42
suck12329-Aug-07 1:42 
AnswerRe: multiple loops Pin
Justin Perez29-Aug-07 2:02
Justin Perez29-Aug-07 2:02 
I think I understand what you mean.

To do them at the same time, you will want to nest one loop inside another

<br />
for(int i = 0; i < 10; i++)<br />
{<br />
   for(int x = 0; x < 10; x++)<br />
   {<br />
      Console.Writeline(string.Format("x is = {0}", x.ToString());<br />
   }<br />
   <br />
   Console.Writeline(string.Format("i is = {0}, i.ToString());<br />
}<br />


What will happen is, loop i will initialize, and after executing, it will get to loop x. When it gets to loop x, it will execute, and this output will be produced at the console.

x is = 0
x is = 1
x is = 2 etc etc etc

Once Loop x has finished, loop I will continue, and Loop x will be executed every step through loop i, until it is finished. You could put another loop inside i, or x.

TO run one loop right after another, just do it like you would a regular loop, just with another right after, like so:

<br />
for(int i = 0; i < 10; i++)<br />
{<br />
   Console.Writeline(string.Format("i is = {0}, i.ToString());<br />
}<br />
<br />
for(int x = 0; x < 10; x++)<br />
{<br />
   Console.Writeline(string.Format("x is = {0}", x.ToString());<br />
}<br />
   <br />


Hope that answeres your question

I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")

AnswerRe: multiple loops Pin
Seishin#29-Aug-07 3:10
Seishin#29-Aug-07 3:10 
GeneralRe: multiple loops Pin
Spacix One29-Aug-07 7:18
Spacix One29-Aug-07 7:18 

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.