What are the basic data types in c#

下次还敢
Release: 2024-04-04 16:57:19
Original
1039 people have browsed it

Basic data types in C

#C# provides a series of basic data types for representing different types of data. These basic data types include:

integer

  • byte: 8-bit unsigned integer (0-255)
  • sbyte: 8-bit signed integer (-128-127)
  • short: 16-bit signed integer (-32,768-32,767)
  • ushort: 16-bit unsigned integer (0-65,535)
  • int: 32-bit signed integer (-2,147,483,648-2,147,483,647)
  • uint: 32-bit unsigned integer (0-4,294,967,295)
  • long: 64-bit signed integer (-9,223,372,036,854,775,808-9,223,372,036,854,775,807)
  • ulong: 64-bit unsigned integer (0-18,446,744,073,709,551,615)

##Float type

  • float : 32-bit floating point number
  • double: 64-bit floating point number

Others

    ##char:
  • 16-bit Unicode character
  • bool:
  • Boolean value (true/false)
  • decimal:
  • 128-bit Decimal data type, used for high-precision calculations
  • string:
  • Unicode string

The above is the detailed content of What are the basic data types in c#. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
c#
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template