[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 01:36:14 -0700


Does anyone know how to get the value of an enum field via reflection?

I tried to do this a couple of times in corcompare so enum discrapancies
would show up as errors, but I was never able to work out how to do it.

Piers.

-----Original Message-----
From: Duncan Mak [mailto:duncan@ximian.com]
Sent: Wednesday, April 10, 2002 8:17 PM
To: Dennis Hayes
Cc: Mono mailing list
Subject: [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 DragActio


On Wed, 2002-04-10 at 17:43, Dennis Hayes wrote:
> Update of
/cvs/public/mcs/class/System.Windows.Forms/System.Windows.Forms
> In directory mono-cvs.ximian.com:/tmp/cvs-serv30436
> 
> Added Files:
> 	CaptionButton.cs CharacterCasing.cs CheckState.cs 
> 	DataGridParentRowsLabelStyle.cs DialogResult.cs DockStyle.cs 
> 	DragAction.cs DragDropEffects.cs DrawItemState.cs DrawMode.cs 
> 	ErrorBlinkStyle.cs ErrorIconAlignment.cs FlatStyle.cs 
> 	FormBorderStyle.cs FormStartPosition.cs FormWindowState.cs 
> 	FrameStyle.cs 
> Log Message:
> * Initial checkin for a number of enums *
> 

Please, please use Enumcheck (in mcs/tools) before committing any Enums,
as it is important that the layout of our Enums are compatible with
Microsoft's.

Also, please always assign values to Enums, instead of implicitly
relying on the order in the code. That way the enums are less prone to
changes in their layout when new fields are added.

I went thru the Enums you checked in and changed the layout accordingly.
This is the patch.

Duncan.