Wednesday, October 23, 2013

Data Types

Data Types


                 data types are divided in to two categories
                                 1.value types
                                 2.reference types
Value Types:
                  value types stored the data on stack ,which is a place.where  the data is stored fixed length.such as
  • bool
  • byte
  • char
  • decimal
  • double
  • enum
  • float
  • int
  • long
  • sbyte
  • short
  • struct
  • uint
  • ulong
  • ushort

Reference Types:
                        these are stored in heap memory which is other place where data an be stored C# supports two preferred reference types
  • class
  • interface
  • delegate
  • object
  • string
    in .net the heap is now more managed and called managed heap. which will be under control of garbage collector providing automatic memory management
                       

No comments:

Post a Comment