Syntax
Main article: C Sharp syntax
See also: Syntax (programming languages)
C# has the following syntax:
Semicolons are used to denote the end of a statement.
Curly braces are used to group statements. Statements are commonly grouped into methods (functions), methods into classes, and classes into namespaces.
Variables are assigned using an equals sign, but compared using two consecutive equals signs.
Square brackets are used with arrays, both to declare them and to get a value at a given index in one of them.
Main article: C Sharp syntax
See also: Syntax (programming languages)
C# has the following syntax:
Semicolons are used to denote the end of a statement.
Curly braces are used to group statements. Statements are commonly grouped into methods (functions), methods into classes, and classes into namespaces.
Variables are assigned using an equals sign, but compared using two consecutive equals signs.
Square brackets are used with arrays, both to declare them and to get a value at a given index in one of them.