Is there is any performance degrades when we assign values like this?
Dropdown1.Enable = dropdown2.Enable = dropdown3.Enable = false;
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The answer is that there is no impact – it is equivalent to three assignment statements.
There are not even any
getoperations called, as is proven below:Console application project:
Generates:
Note that during the assign phase, no ‘get’ers are called, and even though the getters of A and B return different values than the value set on them, the value ultimately assigned to
yis the source value on the RHS of the expression.