[Mono-dev] DateTime/DateTimeFormatInfo patch to reduce Clone()
atsushi at ximian.com
Wed Dec 6 00:34:26 EST 2006
Mirco Bauer wrote:
> On Mon, 2006-12-04 at 20:09 +0100, Paolo Molaro wrote:
>> On 11/30/06 Atsushi Eno wrote:
>>> I noticed that many string properties in DateTimeFormatInfo are
>>> used directly in DateTime. They have to return Clone() which are
>>> not neccessary there.
>> If the arrays are exposed to the user, we should clone them, otherwise
>> the user can change the values in the arrays and break later code.
> *cough* lack of const *cough*
> sorry could not resist :-P
I quite don't understand it - unless you think you can declare
const arrays (which is incorrect).
More information about the Mono-devel-list