C # signed integer unsigned integer

Source: Internet
Author: User

To put it simply:

Signed integer: Positive and Negative
Unsigned integer: that is, only the positive number does not have a negative number.

For example, a 16-bit integer number

Int I; I is a signed integer; value range:-32768--32767

Unsigned Int J; j is an unsigned integer; value range: 0--65535

Description of uint64 by msdn:

Represents a 64-bit unsigned integer.

This API is not compatible with Cls. The alternative API compatible with CLS isDecimal.

But the unsigned integer is not compatible with Cls.

Why.

According to the definition of. net cls: Net limits the interoperability problems caused by these differences by defining the common language specification (CLS: Common Language Specification. CLS defines the minimum features that must be supported by a language targeting the. NET platform, and the complete features required for interoperability between the language and other. NET languages. CLS is a subset of CTS. This means that a language feature may comply with the CTS standards, but beyond the scope of Cls.

That is to say, CLS is the common norm feature of. NET and Other. NET languages. The unsigned language may not support other. NET languages, without the CLS standard. But the standard of the absolute symbol CTS.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.