R
Rune B
Hi Group.
I would like to do the following:
public static DecriptiveCollection GetValuesForDisplay<T>() where T :
System.Enum
{
DecriptiveCollection list = new DecriptiveCollection ();
foreach(T value in Enum.GetValues(typeof(T)))
{
// add description Attributes and enum values to collection
}
return list;
}
But I recieve an "Contstraint cannot be special class Enum" - compile error
....
- why is this?
Regards, Rune
I would like to do the following:
public static DecriptiveCollection GetValuesForDisplay<T>() where T :
System.Enum
{
DecriptiveCollection list = new DecriptiveCollection ();
foreach(T value in Enum.GetValues(typeof(T)))
{
// add description Attributes and enum values to collection
}
return list;
}
But I recieve an "Contstraint cannot be special class Enum" - compile error
....
- why is this?
Regards, Rune