This is a simple yet functional C# console application that lets users manage a list of numbers through a text-based menu. It supports adding, displaying, sorting, and analyzing numeric data.
- while loop
- switch statement
- if / else statements
- for loops
- Console.WriteLine() / Console.Write()
- Console.ReadLine()
- Convert.ToInt32(string)
- List from System.Collections.Generic
- Add() β adds a number to the list.
- Clear() β empties the list.
- Count β gets the current number of items.
- Contains() β checks for duplicates.
β οΈ Built-in LINQ methods such as.Sort(),.Min(),.Max(),.Avg(), and.Find()are not used β all logic is implemented manually.
P- Print numbers in the listA- Add a number (prevents duplicates)M- Calculate mean of the listS- Find smallest numberL- Find largest numberF- Find a number by value and display its indexC- Clear the listT- Toggle sort order (Ascending / Descending)D- Display current sort orderQ- Quit the application
git clone https://github.com/Mostafa-SAID7/list-selection.git
cd list-selection
dotnet runYou can also run it from Visual Studio or Visual Studio Code by opening the folder and pressing F5 or using the terminal.
This project helps you:
- β Practice list manipulation in C#
- β Implement manual sorting (bubble sort logic)
- β Handle user input using switch-case statements
- β Think algorithmically about calculating mean, minimum, and maximum without built-ins
Consider adding the following to enhance the project:
- π Swap two elements by index
- β©οΈ Undo the last action (add or remove)
- πΎ Save/load list from a file
- πΌοΈ Create a GUI version using WinForms or WPF
- π€ Export the list to a .csv or .json file
- .NET 6.0 SDK or later
- An IDE or editor such as:
- Visual Studio
- Visual Studio Code (with the C# extension)
- Or a simple terminal for running with dotnet run
To integrate this documentation into your GitHub project: In your project root directory, create a file named README.md. Copy and paste all of this text into that file. Save the file.
Commit and push it to your GitHub repository using the following commands:
git add README.md
git commit -m "Add full project documentation"
git push origin main
Once pushed, GitHub will automatically render the README.md on the repository homepage.
Mostafa SAID
This project is licensed under the MIT License.