Click here to Skip to main content
15,897,518 members
Home / Discussions / C#
   

C#

 
QuestionAccurate UDP connection Pin
Berlus19-May-08 2:03
Berlus19-May-08 2:03 
AnswerRe: Accurate UDP connection Pin
Mike Dimmick19-May-08 2:23
Mike Dimmick19-May-08 2:23 
GeneralRe: Accurate UDP connection Pin
Berlus20-May-08 19:03
Berlus20-May-08 19:03 
QuestionDictionary Values copy Pin
George_George19-May-08 2:02
George_George19-May-08 2:02 
AnswerRe: Dictionary Values copy Pin
J4amieC19-May-08 2:07
J4amieC19-May-08 2:07 
GeneralRe: Dictionary Values copy Pin
George_George19-May-08 2:13
George_George19-May-08 2:13 
GeneralRe: Dictionary Values copy Pin
J4amieC19-May-08 2:18
J4amieC19-May-08 2:18 
GeneralRe: Dictionary Values copy Pin
George_George19-May-08 2:22
George_George19-May-08 2:22 
Thanks J4amieC!


1.

I am confused why do you think the code "dic.Values.CopyTo(FooArray, 0)" is the same as the code "dict.Add(1,new Foo(10))"? I think code "dic.Values.CopyTo(FooArray, 0)" will fill array FooArray, and "dict.Add(1,new Foo(10))" will fill dic dictionary instance. They are of different types.

Why do you think they are of the same effect?

2.

"code dic.Values.CopyTo(FooArray, 0) will create 3 instances of Foo class" -- what is wrong? I think not the reference, but the real new copy is created?


regards,
George
GeneralRe: Dictionary Values copy Pin
J4amieC19-May-08 2:41
J4amieC19-May-08 2:41 
GeneralRe: Dictionary Values copy Pin
George_George19-May-08 2:49
George_George19-May-08 2:49 
GeneralRe: Dictionary Values copy Pin
J4amieC19-May-08 3:10
J4amieC19-May-08 3:10 
GeneralRe: Dictionary Values copy Pin
George_George19-May-08 3:18
George_George19-May-08 3:18 
AnswerRe: Dictionary Values copy Pin
leppie19-May-08 2:29
leppie19-May-08 2:29 
GeneralRe: Dictionary Values copy Pin
George_George19-May-08 2:34
George_George19-May-08 2:34 
GeneralRe: Dictionary Values copy Pin
J4amieC19-May-08 2:47
J4amieC19-May-08 2:47 
GeneralRe: Dictionary Values copy Pin
George_George19-May-08 2:52
George_George19-May-08 2:52 
GeneralRe: Dictionary Values copy Pin
leppie19-May-08 3:32
leppie19-May-08 3:32 
GeneralRe: Dictionary Values copy Pin
George_George19-May-08 4:26
George_George19-May-08 4:26 
QuestionRegarding XML loading [modified] Pin
manikandanid19-May-08 1:42
manikandanid19-May-08 1:42 
AnswerRe: Regarding XML loading [modified] Pin
J4amieC19-May-08 2:05
J4amieC19-May-08 2:05 
AnswerRe: Regarding XML loading Pin
Mike Dimmick19-May-08 2:25
Mike Dimmick19-May-08 2:25 
QuestionVS 2005 Image control Pin
Dextter19-May-08 1:33
Dextter19-May-08 1:33 
AnswerRe: VS 2005 Image control Pin
leppie19-May-08 2:30
leppie19-May-08 2:30 
QuestionSolution Structure Pin
mark_w_19-May-08 0:44
mark_w_19-May-08 0:44 
AnswerRe: Solution Structure Pin
Christian Graus19-May-08 0:50
protectorChristian Graus19-May-08 0:50 

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.