"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)
    {}
}

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

Popular posts from this blog

How to get emails/alerts on all actions on NSG for entire subscription

Problem In Configuring Biztalk 2009 In Creating A ReceivePort.When I Try To Create A Receive POrt I Got This Error

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts