-
import module
hello all, i have a module which i wish to import in several projects. is there anyway i could do this?
the current method that i'm using is that i'm copying over several modules in all the projects i'm doing and if i had to change a single module i had to replace that module in all the projects, that is quite troublesome
-
Re: import module
Modules are nothing but static classes. Why don't you instead build a class library and then use this class library instead of using a module.
-
Re: import module
sry about that, but how exactly is a class library built? is it like throwing all the different classes within a single file
-
Re: import module
-
Re: import module
i've written a class like this:
Code:
public class library
public class qwe
end class
public class asd
end class
end class
right now i would have to have 1 line of import for every class within library, is there a way to do something like this:
-
Re: import module
Put them into the same class structure. One statement
-
Re: import module
but that would spoil my "logic" because i couldn't simply jus strip out all the innerclasses and put them into 1 class, i mean i could but it will feel "weird".
i have innerclass1 that has f1() and innerclass2 that also have f1(), in this case i wish to refer to f1() by either innerclass.f1() or innerclass.f2()
however if the function name doesn't clash, like if i call specialfunction() and only innerclass7 has it, shouldn't it be understood im calling innerclass7.specialfunction() ?
but i do not wish to do something like this
Code:
imports myclass.innerclass1
imports myclass.innerclass2
imports myclass.innerclass3
imports myclass.innerclass4
imports myclass.innerclass5
imports myclass.innerclass6
imports myclass.innerclass7
everytime i want to use the functionality of myclass functions and refer to functions only through their "last-name" or when last-name clashes (and only when it clashes), their "class-name"."last-name"
-
Re: import module
innerclass can import from myclass, right?
create the base class