how to make private class member private

psychoticRabbit meagain at meagain.com
Tue Mar 13 01:12:15 UTC 2018


I cannot get my head around, why private is not private, in D.

How do I make a private member, private?

-----
module test;

import std.stdio;

void main()
{
     myClass c = new myClass();
     c.myPrivateClassMember= "wtf";
     writeln(c.myPrivateClassMember);
}

class myClass
{
     private string myPrivateClassMember; // private does not mean 
private anymore??
}

------


More information about the Digitalmars-d-learn mailing list