Hi,
Currently the Microsoft C# compiler gives an error if you forget to
initialize a readonly member variable (this can be done either in the
contructor or in the declaration itself.)
I already posted a wish for mcs about that, but:
What about extending this behavior to non-readonly
El s?, 07-06-2003 a las 23:40, Jonathan Stowe escribió:
Prints 01.01.0001 00:00:00.
But try comparing that to 0 or null ;-)
Try comparing it to DateTime.MinValue :-/
What Thong meant was that the initialization of those fields is
equivalent to this stuff in C:
typedef struct {
Members are implicitly initialized to 0 or null so they do have a
meaning even if you don't explicitly initialize them...
^Tum
-Original Message-
From: [EMAIL PROTECTED] [mailto:mono-list-
[EMAIL PROTECTED] On Behalf Of Maurizio Colucci
Sent: Sunday, 8 June 2003 12:50 a.m.
To:
On Saturday 07 June 2003 16:03, Thong (Tum) Nguyen wrote:
Members are implicitly initialized to 0 or null so they do have a
meaning even if you don't explicitly initialize them...
^Tum
I see. :-P
So the semantics of readonly members is members which are not
implicitly initialized, and must be
Hi all,
I've just checked out the very last version of Mono
from CVS and compiled successfully... but as I run
any Mono app (e.g. mono myApp.exe) nothing happens,
or more precisely, the application does nothing and
never returns. Also mcs -v never returns...
My previous Mono distribution was 2
On Sat, 2003-06-07 at 07:03, Thong (Tum) Nguyen wrote:
Members are implicitly initialized to 0 or null so they do have a
meaning even if you don't explicitly initialize them...
^Tum
Umm... no.
Some [ValueType] types don't even have an equivalent to 0 or null.
e.g., System.DateTime, IIRC.
[EMAIL PROTECTED] wrote:
notinitialized
On Sat, 2003-06-07 at 07:03, Thong (Tum) Nguyen wrote:
Members are implicitly initialized to 0 or null so they do have a
meaning even if you don't explicitly initialize them...
Umm... no.
Some [ValueType] types don't even have an equivalent to 0
On the contrary, structs should be designed to consider the default
initialization a valid state. In particular, the default initialization sets
all value type fields to their default value and all reference type fields
to null.
In the particular case of System.DateTime, a default-initialized
are dotgnu and mono classes compatibles? if so why don't both of your create another
project to implement them?
___
Mono-list maillist - [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list
Hi Maurizio,
Readonly members are implicitly initialized (all memory is zeroed before
it is used) but since readonly members can't be set anywhere except for
in the initializer or constructor a warning is given.
The compiler will actually give an warning if you never initialize a
field but it
On Sat, 7 Jun 2003, Arild Fines wrote:
[EMAIL PROTECTED] wrote:
notinitialized
On Sat, 2003-06-07 at 07:03, Thong (Tum) Nguyen wrote:
Members are implicitly initialized to 0 or null so they do have a
meaning even if you don't explicitly initialize them...
Umm... no.
Some
11 matches
Mail list logo