Generic parameter constraint type <typename> is not CLS-compliant
A generic type is marked as <CLSCompliant(True)>, but a constraint on one of its type parameters specifies a type that is marked as <CLSCompliant(False)>, is not marked, or does not qualify because it is a noncompliant type.
For a type to be compliant with the Common Language Specification (CLS), it must use only CLS-compliant types. This applies also to the constraints on the type parameters of a generic type.
The following Visual Basic data types are not CLS-compliant:
When you apply the CLSCompliantAttribute attribute to a programming element, you set the attribute's isCompliant parameter to either True or False to indicate compliance or noncompliance. There is no default for this parameter, and you must supply a value.
If you do not apply CLSCompliantAttribute to an element, it is considered to be noncompliant.
By default, this message is a warning. For information on hiding warnings or treating warnings as errors, see Configuring Warnings in Visual Basic.
Error ID: BC40040
To correct this error
If the generic type must take a type parameter constrained by this particular type, remove CLSCompliantAttribute. The type cannot be CLS-compliant.
If the generic type must be CLS-compliant, change the type of this constraint to the closest CLS-compliant type. For example, in place of UInteger you might be able to use Integer if you do not need the value range above 2,147,483,647. If you do need the extended range, you can replace UInteger with Long.