Mike Eghtebas
asked on
Please explain the statement...
Please demonstrate, add explanation, preferably add some sample codes to illustrate the following statements. I am trying to fully understand the point the author of A, B, and C below is making. Each of these statements most likely true but I am not quite getting them:
A) Never use form or class level variable scope (or access level) unless it is needed.
B) In this code, if the variable strShowMessage is declared as String then that is incorrect since the Messagebox.show does not return String but a DialogResult type:
If strShowMessage = Windows.Forms.DialogResult .Yes Then
C) “textbook text changed event handler that assigns the textbook content to a local variable” is indeed useless.
A) Never use form or class level variable scope (or access level) unless it is needed.
B) In this code, if the variable strShowMessage is declared as String then that is incorrect since the Messagebox.show does not return String but a DialogResult type:
If strShowMessage = Windows.Forms.DialogResult
C) “textbook text changed event handler that assigns the textbook content to a local variable” is indeed useless.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER