8
Reply

What is data type and how many types of data types are in .NET ?

Kumar Bhimsen

Kumar Bhimsen

Jan 04, 2016
3.4k
0

    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

    Sandeep Singh
    August 14, 2016
    1

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

    Keerthi Venkatesan
    March 31, 2016
    1

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

    vipin kv
    March 10, 2016
    1

    datatype is format of data defination.

    Sunil Babu
    April 02, 2016
    0

    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++.

    Rafnas T P
    January 11, 2016
    0

    identified data with the help of data type.

    Kml Surani
    January 09, 2016
    0

    identified data with the help of data type.

    manoj kumar
    January 06, 2016
    0

    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.

    Kumar Bhimsen
    January 04, 2016
    0