public static XAttribute AttributeEnum<T>( XName n, T v, T defval ) where T: new(), IComparable, struct
Parameters
- n
- the attribute name, often the same as the data's property name
- v
- the property value
- defval
- the default value for the property
Type Parameters
- T
- this must be an
Enum
type
Return Value
an
XAttribute
or null