Click here to Skip to main content
15,885,546 members
Home / Discussions / C#
   

C#

 
GeneralRe: continuous PING application ? Pin
auting8211-Feb-20 9:31
auting8211-Feb-20 9:31 
GeneralRe: continuous PING application ? Pin
k505411-Feb-20 10:27
mvek505411-Feb-20 10:27 
GeneralRe: continuous PING application ? Pin
auting8211-Feb-20 10:48
auting8211-Feb-20 10:48 
AnswerRe: continuous PING application ? Pin
Gerry Schmitz10-Feb-20 13:56
mveGerry Schmitz10-Feb-20 13:56 
QuestionModifying multiple fields based on a condition Pin
Bice908-Feb-20 1:07
Bice908-Feb-20 1:07 
AnswerRe: Modifying multiple fields based on a condition Pin
Richard MacCutchan8-Feb-20 1:41
mveRichard MacCutchan8-Feb-20 1:41 
GeneralRe: Modifying multiple fields based on a condition Pin
Bice908-Feb-20 4:10
Bice908-Feb-20 4:10 
GeneralRe: Modifying multiple fields based on a condition Pin
jsc4210-Feb-20 4:09
professionaljsc4210-Feb-20 4:09 
My vote for list v array is to use an array. Populating it is, then, very simple
C#
Label[] labels = [ label1, label2, ..., label8 };  // Works with labels with more meaningful names as well

The original message asked about performance. Forget about performance unless you get noticeable slowness. Your original method probably runs fastest, but it leads to lengthy hard to maintain code. Using lists or arrays makes it much easier to work with, very easy to modify for adding new labels etc, and the difference in performance is not going to be noticeable (unless you have thousands of labels, in which case you would use a different method).
GeneralRe: Modifying multiple fields based on a condition Pin
Richard MacCutchan10-Feb-20 5:11
mveRichard MacCutchan10-Feb-20 5:11 
AnswerRe: Modifying multiple fields based on a condition Pin
OriginalGriff8-Feb-20 2:49
mveOriginalGriff8-Feb-20 2:49 
GeneralRe: Modifying multiple fields based on a condition Pin
Bice908-Feb-20 4:12
Bice908-Feb-20 4:12 
AnswerRe: Modifying multiple fields based on a condition Pin
Eddy Vluggen8-Feb-20 2:51
professionalEddy Vluggen8-Feb-20 2:51 
GeneralRe: Modifying multiple fields based on a condition Pin
Bice908-Feb-20 4:15
Bice908-Feb-20 4:15 
AnswerRe: Modifying multiple fields based on a condition Pin
phil.o8-Feb-20 3:04
professionalphil.o8-Feb-20 3:04 
GeneralRe: Modifying multiple fields based on a condition Pin
Bice908-Feb-20 4:17
Bice908-Feb-20 4:17 
GeneralRe: Modifying multiple fields based on a condition Pin
phil.o8-Feb-20 4:53
professionalphil.o8-Feb-20 4:53 
AnswerRe: Modifying multiple fields based on a condition Pin
Gerry Schmitz8-Feb-20 3:41
mveGerry Schmitz8-Feb-20 3:41 
GeneralRe: Modifying multiple fields based on a condition Pin
Bice908-Feb-20 4:25
Bice908-Feb-20 4:25 
GeneralRe: Modifying multiple fields based on a condition Pin
Gerry Schmitz8-Feb-20 4:52
mveGerry Schmitz8-Feb-20 4:52 
GeneralRe: Modifying multiple fields based on a condition Pin
Bice908-Feb-20 6:22
Bice908-Feb-20 6:22 
QuestionC# Interviews on the horizon Pin
Andrew Torrance7-Feb-20 3:11
Andrew Torrance7-Feb-20 3:11 
AnswerRe: C# Interviews on the horizon Pin
OriginalGriff7-Feb-20 3:52
mveOriginalGriff7-Feb-20 3:52 
GeneralRe: C# Interviews on the horizon Pin
Andrew Torrance7-Feb-20 6:51
Andrew Torrance7-Feb-20 6:51 
GeneralRe: C# Interviews on the horizon Pin
phil.o7-Feb-20 23:05
professionalphil.o7-Feb-20 23:05 
QuestionPerformance penalty of Debug.Assert in .NET Pin
Rob Philpott4-Feb-20 23:44
Rob Philpott4-Feb-20 23:44 

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.