C# Introduction

C# is case-sensitive

Statements terminate with semi-colons

Code is put in code blocks { }

Inline comments start with // and end with newline

Block comments start with /* and end with */

XML comments start with ///

C# is a type-safe language

Variable Naming

Must start with a letter, underscore or @

Subsequent characters may be letters, underscore or numbers

Cannot contain spaces or symbols (except underscore)


Are numbers or strings

Some numbers have suffixes (u, U, l, L, f, F, m, M)

Escape sequences for string literals

Strings are reference types


You may specify strings verbatim with the @ symbol



Combine operators with variables and literal values




Leave a comment

Your email address will not be published. Required fields are marked *