Basic C# Syntax

  • C# code is similar to that of C++ and Java.
  • C# code is case-sensitive.
  • C# compilers ignore additional spacing in code.
  • C# code is made up of a series of statements.
  • Each statement is is terminated with a semicolon.
  • Because whitespace is ignored, multiple statements can appear on one line, though for increased readibility, avoid multiple statements on one line.
  • C# is a block-structured language, meaning statements are part of a block of code.
  • These blocks are delimited with curly brackets ({ and }) and may contain any number of statements, or none at all.
  • Note that the curly bracket characters do not need accompanying semicolons.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: