Showing posts with label What is value type?. Show all posts
Showing posts with label What is value type?. Show all posts

Monday, 16 September 2013

What is value type?


Value type:- Value types of variables can be assigned to value directly. They are derived from the base class. System.valueType
The value types directly contain data. Some examples are int , float, char that means int store the integer value, and string contains the alaphabetically and fkoat contains the floating numbers.

Program:-get the size of int\
namespace DataTypeApplication
{
   class Program
   {
      static void Main(string[] args)
      {
         Console.WriteLine("Size of int: {0}", sizeof(int));
         Console.ReadLine();
      }
   }
}
Size of int: 4
Read more »