Advertisement
Adm1n_0v3rride

The Datatypes of C#

Feb 26th, 2018
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.96 KB | None | 0 0
  1. using System;
  2.  
  3. class MainClass {
  4.   public static void Main (string[] args) {
  5.     /*The many different data types of c# by Adm1n_0v3rride*/
  6.     Console.WriteLine("The sizeof int is: {0}",sizeof(int));
  7.     Console.WriteLine("The sizeof unsigned int is: {0}",sizeof(uint));
  8.     Console.WriteLine("The sizeof unsigned short int is: {0}",sizeof(ushort));
  9.     Console.WriteLine("The sizeof short is: {0}",sizeof(short));
  10.     Console.WriteLine("The sizeof sbyte is: {0}",sizeof(sbyte));
  11.     Console.WriteLine("The sizeof long is: {0}",sizeof(long));
  12.     Console.WriteLine("The sizeof float is: {0}",sizeof(float));
  13.     Console.WriteLine("The sizeof double is: {0}",sizeof(double));
  14.     Console.WriteLine("The sizeof decimal is: {0}",sizeof(decimal));
  15.     Console.WriteLine("The sizeof char is: {0}",sizeof(char));
  16.     Console.WriteLine("The sizeof byte is: {0}",sizeof(byte));
  17.     Console.WriteLine("The sizeof bool is: {0}",sizeof(bool));
  18.     Console.ReadKey();
  19.   }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement