Welcome to the C# Tutorial repository! This repository contains a collection of tutorials, examples, and exercises to help you learn C# programming language from basics to advanced topics. Whether you're just starting with C# or looking to deepen your knowledge, you'll find useful resources here.
This repository aims to provide an easy-to-follow guide for learning C#. It includes a variety of topics, starting with simple syntax and advancing to more complex concepts such as object-oriented programming, LINQ, and asynchronous programming. The tutorials are designed to be beginner-friendly but also include advanced examples for experienced developers.
To start using the tutorials, you'll need to have C# and .NET installed on your machine.
-
Install .NET SDK:
- Visit dotnet.microsoft.com/download and download the latest version of the .NET SDK.
-
Verify Installation:
- Open a terminal or command prompt and type the following to check the installation:
dotnet --version
- Open a terminal or command prompt and type the following to check the installation:
-
Clone the Repository:
- Clone the repository to your local machine using Git:
git clone https://github.com/ManthanThaor/c-sharp-tutorial.git
- Clone the repository to your local machine using Git:
-
Open the Project:
- You can open the individual tutorial folders using Visual Studio, Visual Studio Code, or any text editor of your choice.
-
Run Examples:
- Navigate to the tutorial folder and run the example code with the following command:
dotnet run
- Navigate to the tutorial folder and run the example code with the following command:
Here is a list of the topics included in the tutorials:
-
Introduction to C#
- Basic Syntax
- Data Types
- Variables
-
Control Flow
- If/Else Statements
- Loops (for, while, foreach)
- Switch Cases
-
Object-Oriented Programming
- Classes and Objects
- Methods and Constructors
- Inheritance and Polymorphism
-
Advanced C# Concepts
- LINQ
- Asynchronous Programming
- Exception Handling
This repository also includes a set of exercises to help you practice what you’ve learned. Each exercise includes a problem statement and a solution.
- Exercise 1: Write a program to calculate the factorial of a number.
- Exercise 2: Create a simple class for a 'Person' with properties like name, age, etc.
You can find the exercises in the exercises/
folder.
We welcome contributions to improve the tutorials! If you'd like to contribute, please fork this repository, make your changes, and submit a pull request. Here’s how you can contribute:
- Fork this repository
- Create a new branch for your changes
- Make your changes
- Commit and push your changes
- Submit a pull request
Please ensure your contributions follow the existing coding style and add comments where necessary.
This repository is open-source and available under the MIT License.