Using vb.net, how can I use a class, which does not have a namespace? -
i have file called class.vb. in separate project, utilize class. however, class.vb doesn't use namespace.
class.vb:
imports system public class myclass public sub dosomething() console.writeline("hello") end sub end class
attempting illustrate do:
imports myalias = c:\whatever\class.vb public class myotherclass public sub dosomethingelse() myalias.myclass.dosomething() end sub end class
if possible, what's wrong doing this? perhaps there differences between how normal namespace import works , file import..
to utilize existing class need right click on folder (or project) want add class in (from visual studio) , add existing item. browse file explorer , select class. once done should included properly.
if class uses other classes previous project make sure include them aslo.
if there still problems after create empty class , copy paste content it
Comments
Post a Comment