How to call one static method from another?
Andrea Fontana via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jun 14 00:35:36 PDT 2016
On Tuesday, 14 June 2016 at 07:20:47 UTC, Konstantin Kutsevalov
wrote:
> May be my question was not enought clean...
> this is example of code:
>
> ```
> class ClassName {
>
> public static void function method1()
> {
> // do something
> // and now I need to call other static method
> ClassName.method2(); // What I can use insted of full
> class name?
> // Like "self.method2()"
> }
>
> public static void function method2()
> {
> //...
> }
> }
> ```
Simply:
method2();
Anyway I guess you mean public static void method1() { } without
"function"
Andrea
More information about the Digitalmars-d-learn
mailing list