Skip to content

Latest commit

 

History

History
49 lines (40 loc) · 736 Bytes

README.md

File metadata and controls

49 lines (40 loc) · 736 Bytes

C#

  • My OS for test is ubuntu

Setup

  • dotnet new [web|console|...]

Execute

  • dotnet run

Basics

  • import
    • using Something
  • Print
    • System.Console.WriteLine()
  • Comment
    • // and /**/
  • Variable
    • int thisIsMyVariable=12;

DataTypes

  • Primitives
    • int
      • [-2147483648, 2147483647]
    • double
    • bool
    • char
    • string
    • float
    • long
      • [-9223372036854775808, 9223372036854775807]

TypeCast

  • Implicit
  • Explicit
    • (int) 12.4F

TypeConversion

  • System.Convert.ToInt16()
  • System.Convert.ToInt32()
  • System.Convert.ToInt64()

Constant

  • const [int|bool|...]

Inputs

  • ReadLine()
  • WriteLine()

Operators