[Mono-list] Struct Unit: Stuck again..

Gaurav Vaish gvaish@iitk.ac.in
Sat, 29 Dec 2001 22:19:35 +0530


But,
    this means that the value of the Type object, which is an instance of UnitType, must have an entry corresponding to value 0
(zero), but I checked the values of the elements - they start from 1 (one). Keeping 0 (zero) does not make any sense in this case.
    btw, if I haven't tried out what value the following declaration will give:

public MyClass
{
    public static UnitType myUnit;

    public static void Main()
    {
        System.Console.WriteLine("Value of myUnit: {0}", myUnit);
    }
}

    ah, just written the code here (in mail) --- will try it. If it returns 0 (zero) then it's ok


Cheers,
Gaurav Vaish
http://mastergaurav.virtualave.net
http://calendar.yahoo.com/mastergaurav
---------------------------------

----- Original Message -----
From: "A Rafael D Teixeira" <rafaelteixeirabr@hotmail.com>
To: <gvaish@iitk.ac.in>
Sent: Saturday, December 29, 2001 01:46
Subject: Re: [Mono-list] Struct Unit: Stuck again..


: MSDN says that Unit.Type = 0 means IsEmpty = true.
:
: >From: "Gaurav Vaish" <gvaish@iitk.ac.in>
: >To: <mono-list@ximian.com>
: >Subject: [Mono-list] Struct Unit: Stuck again..
: >Date: Fri, 28 Dec 2001 23:31:39 +0530
: >
: >Hello,
: >     The struct Unit basically has two fields - (enum UnitType) Type and
: >(double) Value.
: >     Besides, it has a property (bool) IsEmpty. I am stuck at what
: >definition to use to mark an instance as Empty, since there's
: >nothing like UnitType.NotSet.
: >
: >     Namespace:  System.Web.UI.WebControls
: >     Struct:  Unit
: >
: >
: >Cheers,
: >Gaurav Vaish
: >http://mastergaurav.virtualave.net
: >http://calendar.yahoo.com/mastergaurav
: >---------------------------------
: >
: >
: >
: >_______________________________________________
: >Mono-list maillist  -  Mono-list@ximian.com
: >http://lists.ximian.com/mailman/listinfo/mono-list
:
:
:
:
: Rafael Teixeira
: Brazilian Developer
:
:
: _________________________________________________________________
: Send and receive Hotmail on your mobile device: http://mobile.msn.com