[Mono-winforms-list] AutoComplete properties patch for Text- and Combobox

Kornél Pál kornelpal at gmail.com
Wed Dec 20 15:27:20 EST 2006


> If this was a common pattern, I wonder if it would be worth having the
> compiler inline Enum.IsDefined to avoid the boxing?   Worth considering.

I think that Enum.IsDefined should not be inlined (by the compiler) because 
it is a run-time reflection API that has to reflect changes made to the 
metadata after (C#) compilation. (Usually by using a newer version of the 
referenced assembly. But metadata can even be modified after C# compilation 
when the enum and the calling code is in the same module.)

Enum range checking should be done by using <= and >= along with enum 
members. (When the values are in multiple ranges a switch statement should 
do the job.)


More information about the Mono-winforms-list mailing list