Kumar Bhimsen
What is data type and how many types of data types are in .NET ?
By Kumar Bhimsen in C# on Jan 04 2016
  • vipin kv
    Mar, 2016 10

    We can classify types in .NET as ValueTypes(example: int,float,etc) and RefrenceTypes(Objects)

    • 2
  • Sandeep Singh
    Aug, 2016 14

    Data type is identifier, using which we can identify the data type. We can not consume data type directly because a data type doesn't have any memory for storing the value, So to consume a data type first we need to create a Copy of a type for which the memory is allocated. Ex:int = 100 // In-validint x = 100 // Valid

    • 1
  • Keerthi Venkatesan
    Mar, 2016 31

    The compiler will tell what type of data used. There are two type of data type. They areValue types and Reference types.

    • 1
  • Sunil Babu
    Apr, 2016 2

    datatype is format of data defination.

    • 0
  • Rafnas T P
    Jan, 2016 11

    Data types refer to an extensive system used for declaring variables or functions of different types. The type of a variable determines how much space it occupies in storage and how the bit pattern stored is interpreted. VB.Net provides a wide range of data types. The following table shows all the data types available: Boolean,Byte,Char,Date,Decimal,Double,Integer,Long,Object,etc The varibles in C#, are categorized into the following types:Value types Reference types Pointer types Value types : Value type variables can be assigned a value directly. They are derived from the class System.ValueType.The value types directly contain data. Some examples are int, char, and float, which stores numbers, alphabets, and floating point numbers, respectively. When you declare an int type, the system allocates memory to store the value.Reference Type : The reference types do not contain the actual data stored in a variable, but they contain a reference to the variables.In other words, they refer to a memory location. Using multiple variables, the reference types can refer to a memory location. If the data in the memory location is changed by one of the variables, the other variable automatically reflects this change in value. Example of built-in reference types are: object, dynamic, and string.Pointer Type : Pointer type variables store the memory address of another type. Pointers in C# have the same capabilities as the pointers in C or C++.

    • 0
  • Kml Surani
    Jan, 2016 9

    identified data with the help of data type.

    • 0
  • manoj kumar
    Jan, 2016 6

    identified data with the help of data type.

    • 0
  • Kumar Bhimsen
    Jan, 2016 4

    A data type is a data storage format that can contain a specific type or range value. Whenever you declare variable, each variable must be assigned a specific data type. Some common data types includes integers, float, character etc.There are two types of data type are available in .NET , they are :1. Value Type2. Reference typeValue Type : Value type refers to the data type that contains the data. Means that, the exact value or data is directly stored in this data type. It means when you assign a value type variable to another variable, It copies the value not reference. It stores the value in stack memory. Int, float, char are value type variable.Reference Type : Refers to the data type that can access data by reference . Reference is an address where the actual data are stores. It stores in the heap memory. String, array, object etc. are reference type.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS