Problem with Arrays in Cases and if's
Hi guys, I need help with a console program in C# in which I can enter customers in an array, search, sort and change the number of customers. For example, I need help with an array that I can edit from an if or a case (the number of variables) (I've only been here for 3 weeks)
4 Replies
Maybe you want to look into lists
https://www.c-sharpcorner.com/article/c-sharp-list/
https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1?view=net-8.0
C# List Tutorial - Everything You Need To Learn About List In C#
Learn how to use C# List and its methods and properties.
List Class (System.Collections.Generic)
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.
What have you got so far?
And yeah, a list is the thing for this, unless you are forced to use an array for some reason.
Likely a school project tbh
Sorry was a little busy. Thanks for the help i will use the list