English
Topic 2. Data types, variables, operators, and expressions
Goal: become familiar with C# built-in data types, value types, and reference types; learn to declare variables and constants, choose an appropriate type for a task, convert types, and validate input; master arithmetic, logical, and bitwise operators, overflow checking, and rounding.
Lecture contents
- The type system and numeric types — The C# type system · Integer types · Floating-point types
- Characters, strings, variables, and null — Boolean, character, and string types · Variables and constants · Types that allow null
- Conversions and arithmetic — Type conversions · Arithmetic operators · Integer overflow
- Logical operators and the Math class — Comparison, logical, and bitwise operators · The Math class and random numbers
- Examples and common mistakes — Program examples · Common mistakes