How to implement private constructor

Ali Çehreli acehreli at yahoo.com
Mon Apr 25 02:22:42 UTC 2022


On 4/24/22 17:18, Vinod K Chandran wrote:

 >      private this(int a, string b, bool c) {

Looks good to me.

There are other ways as well:

class Foo {
private:
   // ...

public:
   // ...
}

Or:

class Foo {
   private {
     // ...
   }

   // ...
}

Ali



More information about the Digitalmars-d-learn mailing list