Click here to Skip to main content
15,881,803 members
Home / Discussions / C#
   

C#

 
GeneralRe: Thread.Sleep(1) taking much longer on Vista than on XP. Pin
Luc Pattyn24-Jul-08 2:31
sitebuilderLuc Pattyn24-Jul-08 2:31 
GeneralRe: Thread.Sleep(1) taking much longer on Vista than on XP. Pin
Anthony Mushrow24-Jul-08 4:04
professionalAnthony Mushrow24-Jul-08 4:04 
GeneralRe: Thread.Sleep(1) taking much longer on Vista than on XP. Pin
Yeates24-Jul-08 4:03
Yeates24-Jul-08 4:03 
GeneralRe: Thread.Sleep(1) taking much longer on Vista than on XP. Pin
Dan Neely24-Jul-08 5:50
Dan Neely24-Jul-08 5:50 
GeneralRe: Thread.Sleep(1) taking much longer on Vista than on XP. Pin
JoeRip24-Jul-08 12:21
JoeRip24-Jul-08 12:21 
AnswerRe: Thread.Sleep(1) taking much longer on Vista than on XP. Pin
Dan Neely24-Jul-08 2:22
Dan Neely24-Jul-08 2:22 
AnswerRe: Thread.Sleep(1) taking much longer on Vista than on XP. Pin
Luc Pattyn24-Jul-08 2:28
sitebuilderLuc Pattyn24-Jul-08 2:28 
Questionpopulating collection of collection Pin
arkiboys24-Jul-08 0:37
arkiboys24-Jul-08 0:37 
Hi,
The code loops through a list of machineNames and for each machinName (There are 18 of them), it loops through a number of settings (There are 39 of them).
At present I have a generic collection to populate all the settings which is called settings.
As I am looping through the settings of each machineNames, I modify the (Fields) appropriate to that MachineName in the settings loop...
In additin I also have a class which holds the fields. This is called clsSetting

This is what I have at present:

private List<DataAccess.clsSetting> settings = new List<DataAccess.clsSetting>(); //collection to hold settings...

//generic collection to hold the result
private List<List<DataAccess.clsSetting>> results = new List<List<DataAccess.clsSetting>>();

//loop through the machineName...
foreach (DataRow dr in _dtMachineNames.Rows)
{
foreach (DataAccess.clsSetting s in settings)
{
//modify these fields for the machineName in the loop...
s.Server = strServername;
s.Result = strResult

//the other fields are not modified...

}

//??????????????????????????
//This is where my question is:
//here I would like to have another collection which holds all the settings for each machineName
//something like:
results.Add(settings)

}

Question:
When I try the above code, i.e. results.Add(settings)
The results collection get added but NOT correctly.
It seems the data in it for each index gets over written because in the above code I modify some of the fields.
Can you please let me know what is wrong here?

Thanks
AnswerRe: populating collection of collection Pin
Wendelius24-Jul-08 7:08
mentorWendelius24-Jul-08 7:08 
QuestionEnable Apply button when needed Pin
JoZ CaVaLLo23-Jul-08 23:57
JoZ CaVaLLo23-Jul-08 23:57 
AnswerRe: Enable Apply button when needed Pin
Christian Graus24-Jul-08 0:03
protectorChristian Graus24-Jul-08 0:03 
AnswerRe: Enable Apply button when needed Pin
N a v a n e e t h24-Jul-08 0:07
N a v a n e e t h24-Jul-08 0:07 
AnswerRe: Enable Apply button when needed Pin
nelsonpaixao24-Jul-08 14:23
nelsonpaixao24-Jul-08 14:23 
Questioncrysatal reports Pin
lankaudaranga23-Jul-08 23:31
lankaudaranga23-Jul-08 23:31 
Questionunable to kill com object Pin
Mogaambo23-Jul-08 22:23
Mogaambo23-Jul-08 22:23 
AnswerRe: unable to kill com object Pin
0x3c024-Jul-08 0:18
0x3c024-Jul-08 0:18 
GeneralRe: unable to kill com object Pin
Mogaambo24-Jul-08 1:28
Mogaambo24-Jul-08 1:28 
AnswerRe: unable to kill com object Pin
stancrm24-Jul-08 2:48
stancrm24-Jul-08 2:48 
AnswerRe: unable to kill com object Pin
JoeRip24-Jul-08 10:54
JoeRip24-Jul-08 10:54 
GeneralRe: unable to kill com object Pin
JoeRip24-Jul-08 12:16
JoeRip24-Jul-08 12:16 
QuestionIs DBF table ANSI? Pin
JoZ CaVaLLo23-Jul-08 21:42
JoZ CaVaLLo23-Jul-08 21:42 
AnswerRe: Is DBF table ANSI? Pin
Guffa23-Jul-08 23:22
Guffa23-Jul-08 23:22 
GeneralRe: Is DBF table ANSI? Pin
JoZ CaVaLLo23-Jul-08 23:35
JoZ CaVaLLo23-Jul-08 23:35 
Questionprint a forms textbox data with out its background [modified] Pin
Anu Palavila23-Jul-08 21:31
Anu Palavila23-Jul-08 21:31 
AnswerRe: print a forms textbox data with out its background Pin
teejayem24-Jul-08 2:30
teejayem24-Jul-08 2:30 

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.