.NET Data Types | Storage Size

.NET Data Types

.NET Data Types | what is Boolean | what is string | what is meant by integers

Data Types are the building block of a programming language and are used to store data(values). Such as numeric, Boolean, and String.

.NET Data Types | Storage Size

.Net Data Types are here:

In .NET you can use various sets of types, known as data types, to store different types of values. In the .NET Framework, Microsoft tried to standardize the data types by introducing a limited and fixed set of data types.

All the .NET Programming languages, such as C# and VB.NET uses the same set of data types without any conflict.

This means that you can call the C# code from VB.NET code and VB.NET to C#, respectively.

.NET Data Types

  • Type: Boolean
  • Storage Size: Stores 2 bytes
  • Value Range: Contains value True or False
  • Type: Byte
  • Storage Size: Stores 1 bytes
  • Value Range: Ranges from 0 to 255. (unsigned)
  • Type: Char (Single Character)
  • Storage Size: Stores 2 bytes
  • Value Range: Ranges from 0 to 65535. (unsigned)
  • Type: Date
  • Storage Size: Stores 8 bytes
  • Type: Decimal
  • Storage Size: Stores 16 bytes
  • Type: Double
  • Storage Size: Stores 8 bytes
  • Type: Integer
  • Storage Size: Stores 4 bytes
  • Type: Long (integer)
  • Storage Size: Stores 8 bytes
  • Type: Object
  • Storage Size: Stores 4 bytes on a 32-bit platform, 8 bytes on a 64-bit platform
  • Type: SByte
  • Storage Size: Stores 1 bytes
  • Value Range: Ranges from -128 to 127 (signed)
  • Type: Short (Short Integer)
  • Storage Size: Stores 2 bytes
  • Value Range: Ranges from -32,768 to 32,767 (signed)
  • Type: Single (Single-Precision floating-point)
  • Storage Size: Stores 4 bytes
  • Type: String (Variable-Length)
  • Storage Size: Stores Depends on the implementing platform
  • Type: UInteger
  • Storage Size: Stores 4 bytes
  • Type: ULong
  • Storage Size: Stores 8 bytes
  • Type: UShort
  • Storage Size: Stores 2 bytes
  • Type: User-Defined (Structure)
  • Storage Size: Stores Depends on the implementing platform

In addition to the standard .NET data type. Each .NET Programming language has its own set of primitive types that are mapped with the corresponding data type in the .NET class library.

With the help of the .NET class library, you can use String in C# and String in VB.NET. however, they both are the same.

vb net type | what is Boolean | what is a floating-point number | what is string | what is an integer | what is the meaning of integers | what is the meaning of string | what is integer number | what is the definition of integer | what is meant by integers | what do you mean by integers

Also Read:


Leave a Comment

Your email address will not be published. Required fields are marked *