Programming Foundations in C#
1. Variables and Data Types
- int, float (double), bool, char, string
- var (implicit typing)
- Constants (const, readonly)
- Type conversions (implicit and explicit)
2. Operators and Expressions
- Arithmetic operators (+, -, *, /, %)
- Comparison operators (==, !=, >, <, >=, <=)
- Logical operators (&&, ||, !)
- Assignment operators (=, +=, -=, etc.)
- Operator precedence and associativity
3. Control Statements
- if, else if, else
- switch-case
- Loops: for, while, do-while, foreach
- break and continue
4. Methods
- Defining and calling methods
- Parameters (value, ref, out, optional)
- Return types
- Method overloading
- Recursion
Programming Foundations in C#
5. Object-Oriented Programming
- Classes and Objects
- Constructors (default, parameterized)
- Fields, Properties (getters/setters)
- Access modifiers: public, private, protected, internal
- Inheritance and base class access
- Polymorphism (method overriding, virtual/override)
- Abstraction (abstract classes and methods)
- Interfaces and multiple inheritance
- Static members
6. Collections and Generics
- Arrays
- List<T>, Dictionary<TKey, TValue>, HashSet<T>, Queue<T>, Stack<T>
- foreach loop with collections
- Generics and type safety
7. Exception Handling
- try, catch, finally
- Handling multiple exceptions
- Custom exception classes
- throw keyword
8. File I/O
- [Link] namespace
- Reading and writing text files using StreamReader/StreamWriter
Programming Foundations in C#
- Using [Link], [Link], [Link]
9. LINQ Basics
- Query and Method syntax
- Filtering, sorting, and projecting data
- Common LINQ operators: Where, Select, OrderBy, GroupBy, etc.
10. Miscellaneous
- Nullable types (int? etc.)
- Null-coalescing operator (??)
- String interpolation and formatting
- DateTime and TimeSpan structs
- Environment and Console classes