Click here to Skip to main content
15,900,815 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Theory and practice of XML layout? Pin
PIEBALDconsult14-Sep-10 17:59
mvePIEBALDconsult14-Sep-10 17:59 
GeneralRe: Theory and practice of XML layout? Pin
Gregory Gadow15-Sep-10 3:46
Gregory Gadow15-Sep-10 3:46 
GeneralRe: Theory and practice of XML layout? Pin
PIEBALDconsult15-Sep-10 15:54
mvePIEBALDconsult15-Sep-10 15:54 
GeneralYou can't assign to an array element within a For Each loop! [modified] Pin
Peter R. Fletcher13-Sep-10 5:17
Peter R. Fletcher13-Sep-10 5:17 
GeneralRe: You can't assign to an array element within a For Each loop! Pin
Luc Pattyn13-Sep-10 6:13
sitebuilderLuc Pattyn13-Sep-10 6:13 
GeneralRe: You can't assign to an array element within a For Each loop! Pin
Peter R. Fletcher13-Sep-10 8:23
Peter R. Fletcher13-Sep-10 8:23 
GeneralRe: You can't assign to an array element within a For Each loop! Pin
Luc Pattyn13-Sep-10 8:33
sitebuilderLuc Pattyn13-Sep-10 8:33 
GeneralRe: You can't assign to an array element within a For Each loop! Pin
Peter R. Fletcher13-Sep-10 9:24
Peter R. Fletcher13-Sep-10 9:24 
If I were calling a Sub, I would find it natural (and well-documented!) that I was getting a Value rather than a Reference in the Sub (and I could explicitly change that, if I wanted to). I think that is the in-line nature of and the almost exact parallel between the For Each and For Next syntax and operation, except for this one important detail, that makes the former's behavior feel wrong.

For a simple, one-dimensional, array of any simple value or object type, you are right - the "pass by value" approach will result in no increase in code size or complexity - but even for an array of relatively small structs, a lot of copying will be necessary to (in effect) pass each struct item by value.
GeneralRe: You can't assign to an array element within a For Each loop! Pin
Luc Pattyn13-Sep-10 9:28
sitebuilderLuc Pattyn13-Sep-10 9:28 
GeneralRe: You can't assign to an array element within a For Each loop! [modified] Pin
harold aptroot13-Sep-10 11:18
harold aptroot13-Sep-10 11:18 
GeneralRe: You can't assign to an array element within a For Each loop! Pin
Luc Pattyn13-Sep-10 11:25
sitebuilderLuc Pattyn13-Sep-10 11:25 
GeneralRe: You can't assign to an array element within a For Each loop! Pin
harold aptroot13-Sep-10 11:29
harold aptroot13-Sep-10 11:29 
GeneralRe: You can't assign to an array element within a For Each loop! Pin
Luc Pattyn13-Sep-10 11:43
sitebuilderLuc Pattyn13-Sep-10 11:43 
GeneralRe: You can't assign to an array element within a For Each loop! Pin
harold aptroot13-Sep-10 12:00
harold aptroot13-Sep-10 12:00 
GeneralRe: You can't assign to an array element within a For Each loop! Pin
DaveyM6913-Sep-10 12:27
professionalDaveyM6913-Sep-10 12:27 
Questionhow do I auto relocate component when resizing the window? Pin
bimbambumbum12-Sep-10 14:09
bimbambumbum12-Sep-10 14:09 
AnswerRe: how do I auto relocate component when resizing the window? Pin
PIEBALDconsult12-Sep-10 14:30
mvePIEBALDconsult12-Sep-10 14:30 
GeneralRe: how do I auto relocate component when resizing the window? Pin
bimbambumbum12-Sep-10 14:39
bimbambumbum12-Sep-10 14:39 
Questiondatagridview Pin
Jefry boycot12-Sep-10 2:28
Jefry boycot12-Sep-10 2:28 
AnswerRe: datagridview Pin
Abhinav S12-Sep-10 3:45
Abhinav S12-Sep-10 3:45 
GeneralRe: datagridview Pin
Jefry boycot16-Sep-10 7:17
Jefry boycot16-Sep-10 7:17 
QuestionVS2010 Pin
Herboren11-Sep-10 8:01
Herboren11-Sep-10 8:01 
AnswerRe: VS2010 Pin
Abhinav S11-Sep-10 19:43
Abhinav S11-Sep-10 19:43 
AnswerRe: VS2010 Pin
Thomas Stockwell12-Sep-10 8:32
professionalThomas Stockwell12-Sep-10 8:32 
AnswerRe: VS2010 Pin
PIEBALDconsult12-Sep-10 16:37
mvePIEBALDconsult12-Sep-10 16:37 

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.