Stats

62 Contributors: 3
Sunday, December 18, 2016
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook

Literals

Download c# eBook

Syntax

  • bool: true or false
  • byte: None, integer literal implicitly converted from int
  • sbyte: None, integer literal implicitly converted from int
  • char: Wrap the value with single-quotes
  • decimal: M or m
  • double: D, d, or a real number
  • float: F or f
  • int: None, default for integral values within the range of int
  • uint: U, u, or integral values within the range of uint
  • long: L, l, or integral values within the range of long
  • ulong: UL, ul, Ul, uL, LU, lu, Lu, lU, or integral values within the range of ulong
  • short: None, integer literal implicitly converted from int
  • ushort: None, integer literal implicitly converted from int
  • string: Wrap the value with double-quotes, optionally prepended with @
  • null: The literal null

Related Examples