jazzIIIlove
asked on
several labels in Designer.cs, the text on the labels should be changed. Several if's?
Hi there;
I got several labels in Designer.cs, and the text on the labels should be changed.
Should I go for several ifs?
I am asking this for the sake of clean coding.
Kind regards.
I got several labels in Designer.cs, and the text on the labels should be changed.
Should I go for several ifs?
I am asking this for the sake of clean coding.
Kind regards.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I mean suppose you have several labels to change their text in the runtime.
>>If you need to intervene on the text at run time, do it in the form constructor or the Load event instead of >>doing it in the Designer.cs file.
Can you provide the LoadEvent example for this, I mean should I have if checks for this, if (this case), then this text on the label else...
Something like that?
Kind regards.
>>If you need to intervene on the text at run time, do it in the form constructor or the Load event instead of >>doing it in the Designer.cs file.
Can you provide the LoadEvent example for this, I mean should I have if checks for this, if (this case), then this text on the label else...
Something like that?
Kind regards.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok, but this definitely works but is this way professional enough?
Regards.
Regards.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi there;
ok, how can I do this with a dictionary together with a lambda expression? (Let's take your example).
Kind regards.
ok, how can I do this with a dictionary together with a lambda expression? (Let's take your example).
Kind regards.
Can you please tell me what type of If you would have. Otherwise, nothing makes sense and any example I might give would be useless.
ASKER
ah, I have no idea, just I want to try to use a dictionary idea storing the label index and set the text of the labels with lambda expression.
Possible or am i forcing the idea?
Regards.
Possible or am i forcing the idea?
Regards.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok,
>>during development, resources are xml files that contains strings, images, anything that can change >>between 2 different versions.
ok we are talking about resx files, right?
If so, is it safe to edit them?
Regards
>>during development, resources are xml files that contains strings, images, anything that can change >>between 2 different versions.
ok we are talking about resx files, right?
If so, is it safe to edit them?
Regards
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Is it healthy to write codes manually in resx files as they seem to connect to the form.
Regards.
Regards.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Can you give a simple example for this?
Kind regards.