Featured post
vb6 - Declare Attribute in VB.NET -
in vb 6.0 code, declare have following line:
attribute vb_name = "myfile"
however, in vb.net, error "expecting declaration". isn't declaration statement? there reference finding differences between vb.net , vb 6.0?
there's no need above code @ in vb.net.
in vb 6, specifies name of file within code—this used things window title, allowing explicitly qualify references members of class in code.
in vb.net, name used in declaration of class serves purpose. no longer need provide explicit name attribute
. consider following mini-class:
public class myfile public sub dowork() 'do here end sub end class
to call dowork
method of class you've named myfile
place in code, write:
myfile.dowork()
just after specified vb_name
attribute under previous versions of vb.
also note file name class/module saved can different; name specify in class declaration not dependent on name you've given file itself, previous versions.
- Get link
- X
- Other Apps
Comments
Post a Comment