C# List (Day 2)
# C# List (Day 2)
# What is a List in C#?
A list is the same sort of idea for Javascript arrays. A list is an object which holds variables in a specific order. The type of variable that the list can store is defined by declaring a type for that list such as String or Int.
# What List methods seem like you might use them often? Why?
The first list method I think will be used often is the List.find method. If I have a set of data in my list, I'm going to want to be able to access specific items in that list for different things such as editing, adding, or removing properties or items. Another method I think is important is the List.Add method which is used to add an item to teh end of a list. This would be useful when a user wants to store certain data in an application. Along with the List.Add method, I'd want to include the List.Remove method which will remove the first occurence of whatever specified item I pass in.
# How would you retrieve an item from a list? What method could you use?
To retrieve an Item from a list, I would use the List.Find method. This will return the first occurrence of the item matching the specified predicate, meaning whatever parameters I set for it to return to me that item.
# Afternoon Challenge Gregslist in C#
https://github.com/TimothyKimble/gregslistcsharp