d equivilent of java's public static class fields

bearophile bearophileHUGS at lycos.com
Sun Aug 8 13:29:14 PDT 2010


Simen kjaeraas:
> class Answer {
>      alias int Correctness;
>      enum Correctness CORRECT = 0;
>      enum Correctness WRONG = 1;
> 
>      Correctness _answerCode;
>      string _answerText;
> 
>      @property Correctness answerCode( ) const {
>          return _answerCode;
>      }

'Correctness' there begs to be a typedef :-]

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list