C# Tutorial
C# Tutorial
Chapter 1: Introduction to C#
- What is C#?
- History & Evolution of C#
- Features of C#
- .NET Framework vs .NET Core vs .NET 5/6/7/8
- Applications of C# (Web, Desktop, Mobile, Games)
- Setting up Environment (Visual Studio / VS Code)
- Your First Program: Hello World
Chapter 2: C# Basics
- Structure of a C# Program
- Variables & Data Types (int, float, double, char, string, bool)
- Constants & Readonly
- Keywords in C#
- Comments (single-line, multi-line, XML comments)
- Operators:
- Arithmetic (+, -, *, /, %)
- Assignment (=, +=, -=)
- Comparison (==, !=, >, <, >=, <=)
- Logical (&&, ||, !)
- Bitwise (&, |, ^, <<, >>)
Chapter 3: Control Statements
- Conditional Statements:
- if, else if, else
- switch statement
- Loops:
- for, while, do while
- foreach
- Jump Statements: break, continue, return, goto
Chapter 4: Methods
- Defining and calling methods
- Method parameters and return types
- Method Overloading
- Optional Parameters
- ref, out, params keywords
- Recursion
Chapter 5: Object-Oriented Programming (OOP)
- Classes & Objects
- Constructors (Default, Parameterized, Static)
- Fields & Properties
- Encapsulation (Getters & Setters)
- Inheritance (Single, Multilevel)
- Polymorphism (Method Overloading & Overriding)
- Abstraction (Abstract Classes)
- Interfaces
- Sealed Classes
- Static Classes & Members
- this keyword
Chapter 6: Arrays & Collections
- Arrays:
- One-dimensional
- Multi-dimensional
- Jagged arrays
- Collections:
- List<T>
- Dictionary<TKey, TValue>
- HashSet<T>
- Queue<T>, Stack<T>
- ArrayList & Hashtable (Legacy)
- LINQ with Collections
Chapter 7: Strings & StringBuilder
- String Manipulation
- String Methods (Length, Substring, IndexOf, Replace, etc.)
- String Interpolation
- StringBuilder class
- Comparing strings
- Formatting strings
Chapter 8: Exception Handling
- try, catch, finally
- throw keyword
- Creating custom exceptions
- Common Exception Types (NullReferenceException, IndexOutOfRangeException, etc.)
- Best Practices
Chapter 9: File Handling
- Reading & Writing Files (Text, CSV)
- FileStream, StreamReader, StreamWriter
- Directory operations
- JSON Serialization & Deserialization (System.Text.Json)
- Binary files
Chapter 10: Advanced C# Concepts
- Generics
- Delegates
- Events
- Lambda Expressions
- Anonymous Methods
- Extension Methods
- Indexers
- Nullable types
- Tuples
Chapter 11: LINQ
- What is LINQ?
- LINQ to Objects
- LINQ to SQL
- LINQ Queries (Where, Select, OrderBy, GroupBy, Join)
- Lambda Expressions with LINQ
- LINQ with Collections and Arrays
Chapter 12: Asynchronous Programming
- Async & Await
- Task Parallel Library (TPL)
- Multi-threading in C#
- Thread vs ThreadPool
- Cancellation Tokens
- BackgroundWorker
Chapter 13: C# with Databases
- ADO.NET Overview
- SqlConnection, SqlCommand, SqlDataReader, SqlDataAdapter
- Parameters and Stored Procedures
- Transactions
- Entity Framework Core
- CRUD Operations with EF Core
- LINQ with EF Core
Chapter 14: C# Web Development
- Introduction to ASP.NET Core
- MVC Architecture
- Controllers, Views, Models
- Routing
- Middleware
- Dependency Injection
- REST API Development
- Authentication & Authorization (Identity Framework, JWT)
- Razor Pages
Chapter 15: Desktop App Development
- WinForms Basics:
- Controls, Events
- Forms & Dialogs
- Database Connectivity
- WPF Basics:
- XAML Introduction
- Data Binding
- MVVM Pattern
- Commands & Events
Chapter 16: Mobile App Development
- .NET MAUI Basics
- Creating Pages
- Navigation
- UI Controls
- SQLite Local Database
- API Integration
Chapter 17: Game Development (Optional)
- Unity with C#
- Scripts & Components
- Game Objects
- Animations
- Event Handling in Games
Chapter 18: C# Design Patterns & Best Practices
- Singleton
- Factory
- Repository
- Dependency Injection
- SOLID Principles
- Code Optimization Tips
Chapter 19: Real-World Projects
- Student Management System
- Inventory System
- Billing System
- Employee Management System
- REST API with JWT Authentication
- WPF Dashboard
- SignalR Chat Application
Chapter 20: Interview Preparation
- C# Basics Questions
- OOP Questions
- ASP.NET Core Questions
- LINQ & EF Core Questions
- Multi-threading & Async Questions
- Database Connectivity Questions
- Design Patterns & Best Practices Questions