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

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -