discrimination of constructors with same number of parameters

sybrandy sybrandy at gmail.com
Thu Dec 30 05:04:29 PST 2010


Why not have something like this:

this (int[] data, string text, bool isMessage = false) {...}

Then, if you just pass in two parameters you treat it as a filename and 
if you pass in a "true" for the third parameter, it's a message.  It's 
not quite what you're looking for, but it's simple and pretty clean.

Casey


More information about the Digitalmars-d-learn mailing list