Click here to Skip to main content
15,881,172 members
Home / Discussions / C#
   

C#

 
QuestionWhich one is better, forcing an enabled=true at each call or check it with an if statement? Pin
Anıl Yıldız25-Sep-09 3:01
Anıl Yıldız25-Sep-09 3:01 
AnswerRe: Which one is better, forcing an enabled=true at each call or check it with an if statement? Pin
freakyit25-Sep-09 4:07
freakyit25-Sep-09 4:07 
GeneralRe: Which one is better, forcing an enabled=true at each call or check it with an if statement? Pin
Anıl Yıldız25-Sep-09 4:18
Anıl Yıldız25-Sep-09 4:18 
GeneralRe: Which one is better, forcing an enabled=true at each call or check it with an if statement? Pin
PIEBALDconsult25-Sep-09 5:32
mvePIEBALDconsult25-Sep-09 5:32 
GeneralRe: Which one is better, forcing an enabled=true at each call or check it with an if statement? Pin
freakyit25-Sep-09 7:00
freakyit25-Sep-09 7:00 
GeneralRe: Which one is better, forcing an enabled=true at each call or check it with an if statement? Pin
PIEBALDconsult25-Sep-09 7:10
mvePIEBALDconsult25-Sep-09 7:10 
AnswerRe: Which one is better, forcing an enabled=true at each call or check it with an if statement? Pin
PIEBALDconsult25-Sep-09 5:06
mvePIEBALDconsult25-Sep-09 5:06 
AnswerRe: Which one is better, forcing an enabled=true at each call or check it with an if statement? Pin
PIEBALDconsult25-Sep-09 6:51
mvePIEBALDconsult25-Sep-09 6:51 
I just experimented with the DataGridView I'm playing with. When Enabled is set to true when it is already true, a DataGridView does not redraw itself. It must therefore already perform the check you're considering adding. I would assume that that is true of all controls, but you should experiment with the particular control you're using.

Bottom line: adding the check is needless and wasteful.
GeneralRe: Which one is better, forcing an enabled=true at each call or check it with an if statement? Pin
Anıl Yıldız25-Sep-09 7:02
Anıl Yıldız25-Sep-09 7:02 
GeneralRe: Which one is better, forcing an enabled=true at each call or check it with an if statement? Pin
freakyit25-Sep-09 7:07
freakyit25-Sep-09 7:07 
GeneralRe: Which one is better, forcing an enabled=true at each call or check it with an if statement? Pin
freakyit25-Sep-09 7:05
freakyit25-Sep-09 7:05 
GeneralRe: Which one is better, forcing an enabled=true at each call or check it with an if statement? Pin
PIEBALDconsult25-Sep-09 7:20
mvePIEBALDconsult25-Sep-09 7:20 
QuestionProblems with ID Automation Pin
Qendro25-Sep-09 2:40
Qendro25-Sep-09 2:40 
GeneralRe: Problems with ID Automation Pin
musefan25-Sep-09 2:56
musefan25-Sep-09 2:56 
GeneralRe: Problems with ID Automation Pin
Qendro25-Sep-09 3:04
Qendro25-Sep-09 3:04 
QuestionPrinting multiple font sizes on the same page... Pin
jameschristianii25-Sep-09 2:37
jameschristianii25-Sep-09 2:37 
AnswerRe: Printing multiple font sizes on the same page... Pin
musefan25-Sep-09 2:54
musefan25-Sep-09 2:54 
GeneralRe: Printing multiple font sizes on the same page... Pin
jameschristianii25-Sep-09 3:07
jameschristianii25-Sep-09 3:07 
GeneralRe: Printing multiple font sizes on the same page... Pin
musefan25-Sep-09 4:24
musefan25-Sep-09 4:24 
AnswerRe: Printing multiple font sizes on the same page... Pin
Dave Kreskowiak25-Sep-09 4:27
mveDave Kreskowiak25-Sep-09 4:27 
GeneralRe: Printing multiple font sizes on the same page... Pin
jameschristianii25-Sep-09 4:32
jameschristianii25-Sep-09 4:32 
GeneralRe: Printing multiple font sizes on the same page... Pin
Dave Kreskowiak25-Sep-09 5:19
mveDave Kreskowiak25-Sep-09 5:19 
GeneralRe: Printing multiple font sizes on the same page... Pin
jameschristianii25-Sep-09 5:51
jameschristianii25-Sep-09 5:51 
AnswerRe: Printing multiple font sizes on the same page... Pin
jameschristianii25-Sep-09 17:44
jameschristianii25-Sep-09 17:44 
AnswerRe: Printing multiple font sizes on the same page... Pin
jameschristianii26-Sep-09 5:30
jameschristianii26-Sep-09 5:30 

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.