Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (42 sloc) 2.28 KB
title ms.custom ms.date helpviewer_keywords ms.assetid
Value types table - C# Reference
seodec18
08/24/2018
value types [C#], table
types [C#], value types
types [C#], suffixes
67d8f631-b6e3-4d83-9910-5ec497f8c5f3

Value types table (C# Reference)

The following table shows the C# value types:

Value type Category Type suffix
bool Boolean
byte Unsigned, numeric, integral
char Unsigned, numeric, integral
decimal Numeric, floating-point M or m
double Numeric, floating-point D or d
enum Enumeration
float Numeric, floating-point F or f
int Signed, numeric, integral
long Signed, numeric, integral L or l
sbyte Signed, numeric, integral
short Signed, numeric, integral
struct User-defined structure
uint Unsigned, numeric, integral U or u
ulong Unsigned, numeric, integral UL, Ul, uL, ul, LU, Lu, lU, or lu
ushort Unsigned, numeric, integral

Remarks

You use a type suffix to specify a type of a numerical literal. For example:

decimal a = 0.1M;

If an integer numerical literal has no suffix, it has the first of the following types in which its value can be represented: int, uint, long, ulong.

If a real numerical literal has no suffix, it's of type double.

See also

You can’t perform that action at this time.