Call methods from primitive data types

image_pdfimage_print
   
  

using System;
using System.Collections.Generic;
using System.Text;

class Program {
    static void Main(string[] args) {
        Console.WriteLine(12.GetHashCode());
        Console.WriteLine(12.Equals(23));
        Console.WriteLine(12.GetType().BaseType);
        Console.WriteLine(12.ToString());
        Console.WriteLine(12); // ToString() called automatically.

    }
}

   
     


This entry was posted in Data Types. Bookmark the permalink.