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

C#

 
QuestionDependencies error while creating Setup file in C# Windows application Pin
Mads1152-Jun-09 3:07
Mads1152-Jun-09 3:07 
AnswerRe: Dependencies error while creating Setup file in C# Windows application Pin
Ahmed Khallaf2-Jun-09 3:22
Ahmed Khallaf2-Jun-09 3:22 
GeneralRe: Dependencies error while creating Setup file in C# Windows application Pin
Mads1152-Jun-09 3:30
Mads1152-Jun-09 3:30 
AnswerRe: Dependencies error while creating Setup file in C# Windows application Pin
Searril2-Jun-09 4:55
Searril2-Jun-09 4:55 
Questionhow do I detect a mouse down in a DataGridView that is not over a cell? Pin
Dan Neely2-Jun-09 2:54
Dan Neely2-Jun-09 2:54 
AnswerRe: how do I detect a mouse down in a DataGridView that is not over a cell? Pin
Jimmanuel2-Jun-09 3:00
Jimmanuel2-Jun-09 3:00 
GeneralRe: how do I detect a mouse down in a DataGridView that is not over a cell? Pin
Dan Neely2-Jun-09 4:04
Dan Neely2-Jun-09 4:04 
Questionadding to a list Pin
maurimauri292-Jun-09 2:47
maurimauri292-Jun-09 2:47 
Hi all,
I am quite new to C# and I bumped into this issue and I cannot understand why it is happening. I have a list of objects of class1. class1 has, as a member variable a list of objects of class2, and class2 has as a member variable a list of objiects of class3. In my code I have to add some objects to the list of objects of class3 for the last element of the list of objects of class2 for one of the elements of the list of objects of class1. It seems it should be straight forward but i found a strange behaviour and maybe you clever people can help me make some sense out of it.
I'll explain with an example: if the list of objects of class1 has 2 elements (ListClass1[0] and ListClass2[1]) and I do

ListClass1[0].ListClass2[ListClass1[0].ListClass2.Length-1].ListClass3.Add(ObjClass3)


at the end of this I find that the ObjClass3 has been added to ListClass1[1].ListClass2[ListClass1[1].ListClass2.Length-1].ListClass3

Why is that happening?
Is there any way around this?
Cheers
Mauri
AnswerRe: adding to a list Pin
Le centriste2-Jun-09 2:50
Le centriste2-Jun-09 2:50 
AnswerRe: adding to a list Pin
musefan2-Jun-09 2:53
musefan2-Jun-09 2:53 
AnswerRe: adding to a list Pin
0x3c02-Jun-09 2:56
0x3c02-Jun-09 2:56 
AnswerRe: adding to a list Pin
maurimauri292-Jun-09 3:30
maurimauri292-Jun-09 3:30 
JokeVERY URGENT!!!!!! Pin
musefan2-Jun-09 2:47
musefan2-Jun-09 2:47 
GeneralRe: VERY URGENT!!!!!! Pin
EliottA2-Jun-09 2:49
EliottA2-Jun-09 2:49 
GeneralRe: VERY URGENT!!!!!! PinPopular
musefan2-Jun-09 2:55
musefan2-Jun-09 2:55 
GeneralRe: VERY URGENT!!!!!! Pin
Blue_Boy2-Jun-09 2:49
Blue_Boy2-Jun-09 2:49 
GeneralRe: VERY URGENT!!!!!! PinPopular
Pete O'Hanlon2-Jun-09 2:51
mvePete O'Hanlon2-Jun-09 2:51 
GeneralRe: VERY URGENT!!!!!! Pin
EliottA2-Jun-09 2:52
EliottA2-Jun-09 2:52 
JokeRe: VERY URGENT!!!!!! Pin
Rajesh R Subramanian2-Jun-09 2:54
professionalRajesh R Subramanian2-Jun-09 2:54 
JokeRe: VERY URGENT!!!!!! Pin
musefan2-Jun-09 2:56
musefan2-Jun-09 2:56 
JokeRe: VERY URGENT!!!!!! Pin
Michael Bookatz2-Jun-09 3:53
Michael Bookatz2-Jun-09 3:53 
GeneralRe: VERY URGENT!!!!!! PinPopular
musefan2-Jun-09 3:00
musefan2-Jun-09 3:00 
GeneralRe: VERY URGENT!!!!!! Pin
Blue_Boy2-Jun-09 3:21
Blue_Boy2-Jun-09 3:21 
GeneralRe: VERY URGENT!!!!!! Pin
0x3c02-Jun-09 2:54
0x3c02-Jun-09 2:54 
GeneralRe: VERY URGENT!!!!!! Pin
musefan2-Jun-09 2:58
musefan2-Jun-09 2:58 

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.