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

C#

 
QuestionDrawing Digital Signal Pin
satsumatable16-Jul-07 18:52
satsumatable16-Jul-07 18:52 
AnswerRe: Drawing Digital Signal Pin
ekynox16-Jul-07 22:41
ekynox16-Jul-07 22:41 
AnswerRe: Drawing Digital Signal Pin
Bert delaVega17-Jul-07 6:24
Bert delaVega17-Jul-07 6:24 
QuestionCopying objects by value Pin
jozsurf16-Jul-07 17:59
jozsurf16-Jul-07 17:59 
AnswerRe: Copying objects by value Pin
originSH16-Jul-07 22:09
originSH16-Jul-07 22:09 
AnswerRe: Copying objects by value Pin
Luc Pattyn16-Jul-07 22:47
sitebuilderLuc Pattyn16-Jul-07 22:47 
GeneralRe: Copying objects by value Pin
jozsurf16-Jul-07 23:42
jozsurf16-Jul-07 23:42 
GeneralRe: Copying objects by value Pin
Luc Pattyn17-Jul-07 0:20
sitebuilderLuc Pattyn17-Jul-07 0:20 
Hi,

When taking your examples literally (except for x.Copy which I read as a.Copy),
there is a performance difference, since the second case creates a lot of new objects,
whereas the first does not.
But none of them make any sense: the first copies all existing elements of ListOfSimpleClass
into a single one, one after another without using it at all; the second creates a lot
of objects, each one a copy from a list element, again without using them.

If you need the objects to exist next to each other, the second case is the right one;
if you need the objects only one at a time, there is no need to do the "new..." stuff;
if you only need to read the values anyhow, there is no need to do a Copy at all: just
read the members of y itself.

Hope this helps.

Smile | :)


GeneralRe: Copying objects by value Pin
jozsurf17-Jul-07 15:06
jozsurf17-Jul-07 15:06 
GeneralRe: Copying objects by value Pin
Luc Pattyn17-Jul-07 16:45
sitebuilderLuc Pattyn17-Jul-07 16:45 
GeneralRe: Copying objects by value Pin
jozsurf17-Jul-07 16:59
jozsurf17-Jul-07 16:59 
GeneralRe: Copying objects by value [modified] Pin
Luc Pattyn17-Jul-07 17:15
sitebuilderLuc Pattyn17-Jul-07 17:15 
GeneralRe: Copying objects by value Pin
jozsurf17-Jul-07 18:07
jozsurf17-Jul-07 18:07 
GeneralRe: Copying objects by value Pin
Luc Pattyn22-Jul-07 12:00
sitebuilderLuc Pattyn22-Jul-07 12:00 
QuestionHow to set and get Windows Application's Version? Pin
Khoramdin16-Jul-07 17:21
Khoramdin16-Jul-07 17:21 
AnswerRe: How to set and get Windows Application's Version? Pin
Vikram A Punathambekar16-Jul-07 17:40
Vikram A Punathambekar16-Jul-07 17:40 
QuestionRe: How to set and get Windows Application's Version? Pin
Khoramdin16-Jul-07 19:20
Khoramdin16-Jul-07 19:20 
AnswerRe: How to set and get Windows Application's Version? Pin
Vikram A Punathambekar16-Jul-07 21:05
Vikram A Punathambekar16-Jul-07 21:05 
AnswerRe: How to set and get Windows Application's Version? Pin
originSH16-Jul-07 22:14
originSH16-Jul-07 22:14 
AnswerRe: How to set and get Windows Application's Version? Pin
ekynox17-Jul-07 13:33
ekynox17-Jul-07 13:33 
QuestionDataGrid date AND time Column[modified] Pin
swjam16-Jul-07 14:24
swjam16-Jul-07 14:24 
AnswerRe: DataGrid date AND time Column[modified] Pin
Michael Sync16-Jul-07 17:39
Michael Sync16-Jul-07 17:39 
GeneralRe: DataGrid date AND time Column[modified] Pin
swjam16-Jul-07 20:59
swjam16-Jul-07 20:59 
GeneralRe: DataGrid date AND time Column[modified] Pin
Rhys Gravell16-Jul-07 23:09
professionalRhys Gravell16-Jul-07 23:09 
Questionadd a page Pin
daku116-Jul-07 12:47
daku116-Jul-07 12:47 

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.