Complete the code to create a list of integers.
List<int> numbers = new List<int>[1];In C#, to create a new list, you use parentheses () after the constructor name.
Complete the code to add an element to the list.
numbers.[1](5);
Append which is not a method on List.Push which is used in stacks.The Add method is used to add an element to a List in C#.
Fix the error in the code to check if the list contains the number 10.
bool hasTen = numbers.[1](10);
Has which is not a List method.Includes which is from JavaScript.The Contains method checks if a list has a specific element.
Fill both blanks to create a dictionary and add a key-value pair.
Dictionary<string, int> ages = new Dictionary<string, int>[1]; ages.[2]("Alice", 30);
Insert which is not a Dictionary method.Use parentheses () to create the dictionary and Add to add a key-value pair.
Fill all three blanks to create a list, add an element, and check its count.
List<string> fruits = new List<string>[1]; fruits.[2]("Apple"); int count = fruits.[3];
Length which is for arrays, not lists.Create the list with (), add with Add, and get the number of items with Count.
