Sunday, August 18, 2019

How to Fix Case bypasses initialization of a local variable.

This error occurs when we use switch statement and different cases. We declare or initialize variables in one case but when our switch statement bypass that case in which any variable is declared and that variable is used in other cases which match the switch statement arguments, in that case compiler will show this problem.

#CaseBypasses #cPlusPlusProblem

Friday, August 2, 2019

How to stop a loop for event listener in between or click a button when loop is running

Question:  

How to stop a loop for event listener in between or click a button when loop is running?

Answer: 

Add Application.DoEvents(); in loop.