FlashKeepers

C# · College · College and University

C# III: LINQ and Collections

List, Dictionary, HashSet, IEnumerable, LINQ query and method syntax, deferred execution and lambda expressions.

About this set

40 basic cards for College C#. It opens with "What does List.Add() do?" and "How do you remove an element at a specific index from a List?". Study it alongside the other College sets below.

40 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What does List.Add() do?
Show answerAdds an item to the end of the list
How do you remove an element at a specific index from a List?
Show answerUse RemoveAt(index)
How do you access an element at index 3 in a List?
Show answerUse list[3]
What property gives the number of elements in a List?
Show answerCount
What does List.Clear() do?
Show answerRemoves all elements from the list
What does List.Contains(item) return?
Show answerBoolean indicating whether the item exists in the list
How do you add a key-value pair to a Dictionary?
Show answerUse Add(key, value) or dict[key] = value
Can a Dictionary have duplicate keys?
Show answerNo, all keys must be unique
What does Dictionary.ContainsKey(key) return?
Show answerBoolean indicating whether the key exists in the dictionary
What does Dictionary.TryGetValue(key, out value) do?
Show answerSafely retrieves a value and returns bool indicating success
How do you remove a key-value pair from a Dictionary?
Show answerUse Remove(key)
What do Dictionary.Keys and Dictionary.Values return?
Show answerCollections of all keys and all values respectively
What does HashSet<T> remove that a List<T> allows?
Show answerDuplicate values
What does HashSet.Add() return?
Show answerBoolean, true if added, false if element already existed
What is the time complexity of HashSet.Contains()?
Show answerO(1) average case

25 more cards in the app

Study this set free