This project, named CursoCSharp, was developed as a learning exercise to consolidate C# knowledge through various practical examples. It covers fundamental and advanced topics such as classes, methods, collections, object-oriented programming (OOP), exceptions, and even basic API usage. The project offers a centralized system to execute a wide range of C# exercises, providing a hands-on learning experience.
The project covers a wide variety of C# topics, including:
- Classes and Methods: Explore methods with return types, static methods, attributes, parameters, enums, structs, and more.
- Collections: Work with arrays, lists, sets, queues, stacks, dictionaries, and other common collection types in C#.
- Object-Oriented Programming (OOP): Delve into OOP concepts like inheritance, encapsulation, polymorphism, abstract classes, and interfaces.
- Methods and Functions: Understand how to use lambda expressions, delegates, anonymous functions, and method extensions.
- Exception Handling: Learn how to handle exceptions and create custom exception classes.
- Basic API Usage: Practice basic file operations and API usage in C#.
Here are some of the notable exercises implemented:
MetodosComRetorno.Executar
: Demonstrates methods with return types.AtributosEstaticos.Executar
: Learn about static attributes in C#.Enum.ExemploEnum.Executar
: Explore enum usage.StructVsClasse.Executar
: Compare structs versus classes.
Array.Executar
: Work with arrays.ColecoesList.Executar
: Demonstrates list collections.Dictionary.Executar
: Explore the dictionary collection type.
Heranca.Executar
: Shows how inheritance works in C#.Encapsulamento.Executar
: Explore encapsulation in object-oriented programming.Polimorfismo.Executar
: Demonstrates polymorphism.
PrimeiraExcecao.Executar
: Handle the first exception.ExcecoesPersonalizadas.Executar
: Implement custom exceptions.
PrimeiroArquivo.Executar
: Demonstrates basic file manipulation through the API.
The project organizes exercises by category, providing a centralized way to access and execute each one:
- ClassesEMetodos: Exercises related to C# classes and methods.
- Colecoes: Exercises focused on collections in C#.
- OO: Covers object-oriented programming concepts.
- MetodosEFuncoes: Demonstrates lambda expressions and delegate usage.
- Excecoes: Focuses on exception handling in C#.
- API: Includes examples for working with basic APIs.
-
Clone the repository.
git clone <repository-url>
-
Navigate to the project directory and build the solution:
cd CursoCSharp dotnet build
-
Run the project:
dotnet run
The program will present a selection of exercises from which you can choose to run.
C#
Collections
OOP
Delegates
Exceptions
Lambda
API
Exercises
Learning C#