"Argument type 'ushort' is not CLS-compliant"
i have class opens usb device using pid , vid. these values traditionally unsigned shorts (16bit unsigned). made static function creating device uint16 arguments , compiler warning telling me uint16s not cls compliant. ("argument type 'ushort' not cls-compliant") i've used them in other functions without warning. what's wrong this?
public class device : system.idisposable
{
public static device opendevice(uint16 vid, uint16 pid)
{}
}
public class device : system.idisposable
{
public static device opendevice(uint16 vid, uint16 pid)
{}
}
it means not cls compliant languages have support type. therefore must either mark assembly being not cls compliant or use data type int32:
.NET Framework > Common Language Runtime Internals and Architecture
Comments
Post a Comment