← Back to Tutorials Chapter 11

References

C# Keywords Quick Reference

Access Modifiers: public, private, protected, internal
Types: int, double, float, decimal, char, bool, string, object, var
Loops: for, foreach, while, do
Conditionals: if, else, switch, case, default
OOP: class, struct, interface, enum, record, abstract, virtual, override, sealed, static, readonly, const
Exceptions: try, catch, finally, throw, using
Async: async, await, Task
Other: new, this, base, null, is, as, typeof, nameof, yield, partial, extern

Built-in Types

int      // 32-bit integer (-2.1B to 2.1B)
long     // 64-bit integer
float    // 32-bit floating point (7 digits precision)
double   // 64-bit floating point (15-16 digits)
decimal  // 128-bit for financial/monetary (28-29 digits)
char     // Single Unicode character
bool     // true or false
string   // Sequence of characters
object   // Base type of all types
byte     // 8-bit unsigned (0-255)

Common String Methods

Length, ToUpper(), ToLower(), Trim(), Substring(start, length),
IndexOf(), LastIndexOf(), Contains(), StartsWith(), EndsWith(),
Replace(old, new), Split(separator), Join(separator, array),
ToCharArray(), PadLeft(), PadRight()

Common LINQ Operators

Where, Select, OrderBy, ThenBy, GroupBy, Join, Aggregate,
Any, All, Contains, Count, Sum, Average, Min, Max,
First, FirstOrDefault, Single, SingleOrDefault,
Skip, Take, Distinct, Union, Intersect, Except

Further Reading

C# reference sheet

Practice Task

Write a C# program that applies the concepts covered in this chapter. Experiment with different inputs and test your understanding.