[Mono-list] Re: [Mono-patches]mcs/class/System.Windows.Forms/System.Windows.FormsCaptionButton.cs,NONE,1.1 CharacterCasing.cs,NONE,1.1CheckState.cs,NONE,1.1 DataGridParentRowsLabelStyle.cs,NONE,1.1DialogResult.cs,NONE,1.1 DockStyle.cs,NONE,1.1 DragAct

Piers Haken piersh@friskit.com
Thu, 11 Apr 2002 04:09:58 -0700


Yeah that's what I was seeing before. I actually wanted to be able to
get the value of an enum's field from its FieldInfo. I was messing
around with the Enum stuff for a while. Now I just realized I can just
call FieldInfo.GetValue(). Doh!

So now the class status page will reflect mismatches in enum values (and
other static-literal fields).

Piers.

-----Original Message-----
From: Serge [mailto:serge@wildwestsoftware.com] 
Sent: Thursday, April 11, 2002 3:22 AM
To: mono-list@ximian.com
Subject: Re: [Mono-list] Re:
[Mono-patches]mcs/class/System.Windows.Forms/System.Windows.FormsCaption
Button.cs,NONE,1.1 CharacterCasing.cs,NONE,1.1CheckState.cs,NONE,1.1
DataGridParentRowsLabelStyle.cs,NONE,1.1DialogResult.cs,NONE,1.1
DockStyle.cs,NONE,1.1 DragAct


> Try mcs/tools/EnumCheck.cs

Be warned that EnumCheck behaves incorrectly in case enum has several
names mapped on a single numerical value. It will print the first
literal. For example: System.Xml.XPath.XPathResultType Navigator =
String (= 1) String will be printed twice. It is required to get both
Names and Values and use the map.

Sergey


----- Original Message -----
From: "Nick Drochak" <ndrochak@gol.com>
To: "Piers Haken" <piersh@friskit.com>
Cc: "Mono mailing list" <mono-list@ximian.com>
Sent: Thursday, April 11, 2002 11:57 AM
Subject: RE: [Mono-list] Re:
[Mono-patches]mcs/class/System.Windows.Forms/System.Windows.FormsCaption
Butt
on.cs,NONE,1.1 CharacterCasing.cs,NONE,1.1CheckState.cs,NONE,1.1
DataGridParentRowsLabelStyle.cs,NONE,1.1DialogResult.cs,NONE,1.1
DockStyle.cs,NONE,1.1 DragAct


> | Does anyone know how to get the value of an enum field via 
> | reflection?
> |
>
> Try mcs/tools/EnumCheck.cs
>
> Nick D.
>
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com 
> http://lists.ximian.com/mailman/listinfo/mono-list
>




_______________________________________________
Mono-list maillist  -  Mono-list@ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list