Re: How to call one static method from another?

2016-06-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/14/16 6:08 AM, pineapple wrote: On Tuesday, 14 June 2016 at 07:35:36 UTC, Andrea Fontana wrote: Simply: method2(); Also, typeof(this).method2(); Yes, if you want to distinguish between another function named method2. -Steve

Re: How to call one static method from another?

2016-06-14 Thread pineapple via Digitalmars-d-learn
On Tuesday, 14 June 2016 at 07:35:36 UTC, Andrea Fontana wrote: Simply: method2(); Also, typeof(this).method2();

Re: How to call one static method from another?

2016-06-14 Thread Konstantin Kutsevalov via Digitalmars-d-learn
On Tuesday, 14 June 2016 at 07:35:36 UTC, Andrea Fontana wrote: 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 someth

Re: How to call one static method from another?

2016-06-14 Thread Andrea Fontana via Digitalmars-d-learn
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

Re: How to call one static method from another?

2016-06-14 Thread Konstantin Kutsevalov via Digitalmars-d-learn
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?

How to call one static method from another?

2016-06-13 Thread Konstantin Kutsevalov via Digitalmars-d-learn
Hi, Just can't found information about "this" for static methods. Can anyone explain how to call current class from static methods? For example I have some class and I need to call some static method of current class from another static method. I don't like to use full class name for that, but