C# is an object orientated language created by Microsoft. Source files are stores as .CS files.
Useful Links
Precedence of Operators Description of the order in which operators are evaluation (for example * is execute before +)
Additional Namespaces
Additional namespaces can be added with the using
directive. This will allow classes in other namespaces to be called without additional references. For example:
using System;
Console.WriteLine("Hello World");
Is a short way of saying:
System.Console.WriteLine("Hello World!");
Variable Types
C# variables are made of of both Value Types and Reference Types. Value Types are stored in memory as a data value and Reference Types are stored in memory as a reference or pointer.
Reference Types
Type | Name | Declaration Examples | Description |
array[] | n/a | int[] scores; | A sequence of values |
string | String | string message; | A sequence of characters |
object | Object | Car holden = new Car(); | An instance of a class, derived from the base object Object |
dynamic | n/a | dynamic d = 15; | Can store any type |
pointer* | n/a | int* addr; | Stores memory address |