Type <typename> is not CLS-compliant

A variable, property, or function return is declared with a data type that is not CLS-compliant.

For an application to be compliant with the Language Independence and Language-Independent Components (CLS), it must use only CLS-compliant types.

The following Visual Basic data types are not CLS-compliant:

Error ID: BC40041

To correct this error

  • If your application needs to be CLS-compliant, change the data type of this element 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.

  • If your application does not need to be CLS-compliant, you do not need to change anything. You should be aware of its noncompliance, however.

See Also

<PAVE OVER> Writing CLS-Compliant Code