Click here to Skip to main content
15,899,026 members
Home / Discussions / C#
   

C#

 
GeneralRe: loading machine names from a txt file... Pin
partialdata30-Jul-09 9:00
partialdata30-Jul-09 9:00 
AnswerRe: loading machine names from a txt file... Pin
CoderForEver30-Jul-09 9:08
CoderForEver30-Jul-09 9:08 
GeneralRe: loading machine names from a txt file... Pin
partialdata30-Jul-09 9:12
partialdata30-Jul-09 9:12 
GeneralRe: loading machine names from a txt file... Pin
CoderForEver30-Jul-09 9:32
CoderForEver30-Jul-09 9:32 
GeneralRe: loading machine names from a txt file... Pin
partialdata30-Jul-09 9:41
partialdata30-Jul-09 9:41 
AnswerRe: loading machine names from a txt file... Pin
Alan N30-Jul-09 10:22
Alan N30-Jul-09 10:22 
GeneralRe: loading machine names from a txt file... Pin
partialdata31-Jul-09 5:19
partialdata31-Jul-09 5:19 
GeneralRe: loading machine names from a txt file... Pin
Alan N31-Jul-09 5:55
Alan N31-Jul-09 5:55 
Yes that's right, foreach or just a plain for loop.

string[] machineNames = System.IO.File.ReadAllLines(filename);
// foreach loop
foreach (string name in machineNames) {
  DoTask(name);
}

// equivalent for loop
for (int i = 0; i < machineNames.Length; i++) {
  DoTask(machineNames[i]);
}


Alan.
GeneralRe: loading machine names from a txt file... Pin
partialdata31-Jul-09 6:53
partialdata31-Jul-09 6:53 
GeneralRe: loading machine names from a txt file... Pin
partialdata31-Jul-09 7:56
partialdata31-Jul-09 7:56 
GeneralRe: loading machine names from a txt file... Pin
Alan N31-Jul-09 9:43
Alan N31-Jul-09 9:43 
GeneralRe: loading machine names from a txt file... Pin
partialdata31-Jul-09 9:58
partialdata31-Jul-09 9:58 
AnswerRe: loading machine names from a txt file... Pin
Alan N31-Jul-09 12:10
Alan N31-Jul-09 12:10 
QuestionHow to write Newlines in XmlDocument Pin
Jordanwb30-Jul-09 5:38
Jordanwb30-Jul-09 5:38 
AnswerRe: How to write Newlines in XmlDocument Pin
Ian Shlasko30-Jul-09 5:45
Ian Shlasko30-Jul-09 5:45 
GeneralRe: How to write Newlines in XmlDocument Pin
Jordanwb30-Jul-09 5:46
Jordanwb30-Jul-09 5:46 
AnswerRe: How to write Newlines in XmlDocument Pin
PIEBALDconsult30-Jul-09 8:16
mvePIEBALDconsult30-Jul-09 8:16 
QuestionList View item selection Pin
satsumatable30-Jul-09 4:06
satsumatable30-Jul-09 4:06 
Questioncalling button click event Pin
Vivek Vijayan30-Jul-09 3:11
Vivek Vijayan30-Jul-09 3:11 
AnswerRe: calling button click event Pin
DaveyM6930-Jul-09 3:12
professionalDaveyM6930-Jul-09 3:12 
GeneralRe: calling button click event Pin
Vivek Vijayan30-Jul-09 3:18
Vivek Vijayan30-Jul-09 3:18 
GeneralRe: calling button click event Pin
Baeltazor30-Jul-09 17:12
Baeltazor30-Jul-09 17:12 
AnswerRe: calling button click event PinPopular
Mike Ellison30-Jul-09 3:16
Mike Ellison30-Jul-09 3:16 
AnswerRe: calling button click event Pin
PIEBALDconsult30-Jul-09 4:21
mvePIEBALDconsult30-Jul-09 4:21 
AnswerRe: calling button click event Pin
Baeltazor30-Jul-09 17:10
Baeltazor30-Jul-09 17:10 

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.