In Java you can store a class in a separate file and instantiate it from a method in another file as long as the class file is in the same directory but this doesn’t seem to work in Visual Basic.
Am I missing something?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Placing files in the same directory doesn’t mean much in VB.NET (or C#, for that matter).
If both classes are in the same namespace and the class you want to access/instantiate has
Friendor wider accessibility you should be able to instantiate it – nothing more should be required (assuming no private default constructor and such shenanigans).