Click here to Skip to main content
15,889,116 members
Home / Discussions / C#
   

C#

 
AnswerRe: Inplement a precise timer Pin
englebart2-Sep-10 2:07
professionalenglebart2-Sep-10 2:07 
GeneralRe: Inplement a precise timer [modified] Pin
cateyes992-Sep-10 11:54
cateyes992-Sep-10 11:54 
AnswerRe: Inplement a precise timer Pin
agolddog2-Sep-10 4:08
agolddog2-Sep-10 4:08 
GeneralRe: Inplement a precise timer Pin
cateyes992-Sep-10 12:10
cateyes992-Sep-10 12:10 
GeneralRe: Inplement a precise timer Pin
agolddog2-Sep-10 12:16
agolddog2-Sep-10 12:16 
GeneralRe: Inplement a precise timer Pin
rhp80902-Sep-10 15:28
rhp80902-Sep-10 15:28 
QuestionGenericize access to variables Pin
David Knechtges1-Sep-10 3:59
David Knechtges1-Sep-10 3:59 
AnswerRe: Genericize access to variables PinPopular
Ennis Ray Lynch, Jr.1-Sep-10 4:07
Ennis Ray Lynch, Jr.1-Sep-10 4:07 
Yes, however, you may not like it.
foreach(Control control in Controls){
    if(control is Label){
        ((Label)control).Text = "Something";
    }
}


Unfortunately this will set all labels. If you are in Windows forms you can use the Tag option to set a tag, or you can subclass your Label control to give it a type.

The other option is, after Initialize component, place all Labels you care about looping through in a collection.

Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS.

"And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

GeneralRe: Genericize access to variables Pin
Chris Trelawny-Ross1-Sep-10 4:28
Chris Trelawny-Ross1-Sep-10 4:28 
GeneralRe: Genericize access to variables Pin
harold aptroot1-Sep-10 4:42
harold aptroot1-Sep-10 4:42 
GeneralRe: Genericize access to variables Pin
Luc Pattyn1-Sep-10 5:12
sitebuilderLuc Pattyn1-Sep-10 5:12 
GeneralRe: Genericize access to variables Pin
Chris Trelawny-Ross1-Sep-10 5:19
Chris Trelawny-Ross1-Sep-10 5:19 
AnswerRe: Genericize access to variables Pin
#realJSOP1-Sep-10 5:21
mve#realJSOP1-Sep-10 5:21 
GeneralRe: Genericize access to variables Pin
Ian Shlasko1-Sep-10 5:25
Ian Shlasko1-Sep-10 5:25 
AnswerRe: Genericize access to variables PinPopular
The Man from U.N.C.L.E.1-Sep-10 7:05
The Man from U.N.C.L.E.1-Sep-10 7:05 
AnswerRe: Genericize access to variables Pin
Eddy Vluggen1-Sep-10 7:42
professionalEddy Vluggen1-Sep-10 7:42 
AnswerRe: Genericize access to variables Pin
BC3Tech2-Sep-10 3:10
BC3Tech2-Sep-10 3:10 
GeneralRe: Genericize access to variables Pin
Eddy Vluggen2-Sep-10 8:45
professionalEddy Vluggen2-Sep-10 8:45 
GeneralRe: Genericize access to variables Pin
Shani Natav2-Sep-10 9:14
Shani Natav2-Sep-10 9:14 
GeneralRe: Genericize access to variables Pin
Eddy Vluggen2-Sep-10 9:22
professionalEddy Vluggen2-Sep-10 9:22 
AnswerRe: Genericize access to variables PinPopular
Daniel Grunwald1-Sep-10 8:20
Daniel Grunwald1-Sep-10 8:20 
GeneralRe: Genericize access to variables Pin
PIEBALDconsult1-Sep-10 9:04
mvePIEBALDconsult1-Sep-10 9:04 
AnswerRe: Genericize access to variables [modified] Pin
Paul Michalik1-Sep-10 11:47
Paul Michalik1-Sep-10 11:47 
GeneralRe: Genericize access to variables Pin
AspDotNetDev1-Sep-10 11:51
protectorAspDotNetDev1-Sep-10 11:51 
AnswerRe: Genericize access to variables Pin
Łukasz Nowakowski1-Sep-10 20:14
Łukasz Nowakowski1-Sep-10 20:14 

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.