what is the difference between..
-
dim a as label dim a as new label dim a as new label() Can I use a.text immediately after one of the 3 dim ways? Or should I have to add a line "a=new label" before using a.text in the first dim way"dim a as label"? I hope you know my means. Thanks. this is my signature for forums quoted from shog*9: I can't help but feel, somewhere deep within that withered, bitter, scheming person, there is a small child, frightened, looking a way out.
-
dim a as label dim a as new label dim a as new label() Can I use a.text immediately after one of the 3 dim ways? Or should I have to add a line "a=new label" before using a.text in the first dim way"dim a as label"? I hope you know my means. Thanks. this is my signature for forums quoted from shog*9: I can't help but feel, somewhere deep within that withered, bitter, scheming person, there is a small child, frightened, looking a way out.
-
After the first "dim", a is still nothing so you can't use a.text immediately. You can do so after the other two "dims", however. The recommended way is: dim a as label = new label() which is equivalent to the second and the third dim.
But in fact,I see such dim : dim form1 as form2(form2 is an user-defined class) and the app uses "form1.param1"(param1 is also defined in class form2) immediately,not use new pointer first. this is my signature for forums quoted from shog*9: I can't help but feel, somewhere deep within that withered, bitter, scheming person, there is a small child, frightened, looking a way out.