vb.net - If I imported a class, should I still prepend that class name to its methods when they're used in a different class? -


i work codebase there many classes thousands of lines of code. i've noticed inconsistencies in style concerning prepending class names when using methods , i'm trying figure out previous developer's reasoning. if we

import generalcode 

in class a, bad practice write

generalcode.dosomething() 

in class since imported (instead of using dosomething())? think so, suppose it's nice know methods come classes @ glance, since class imports many classes , uses methods several of them.

edit: vb.net, not java (sorry wrong tag, rough morning). new vb.net generalcode , dosomething() not declared static, neither import in class a.

might vb.net, dosomething() can indeed used or without prepending generalcode.

a method need prefixed

  1. the class name if it's static method.

  2. the name of instance when it's not static method.

unless calling method own class.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -