using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DataTypes
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine();
Console.WriteLine("Size of Int " + sizeof(int));
Console.WriteLine("Size of Float " + sizeof(float));
Console.WriteLine("Size of Double " + sizeof(double));
Console.WriteLine("Size of Decimal " + sizeof(decimal));
Console.WriteLine("Size of Char " + sizeof(char));
//Console.WriteLine("Size of String " + sizeof(string)); -- can't do this because string is of unknown size
}
}
}
No comments:
Post a Comment