C# Collections, Delegates, and Events Practice Flashcards

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/21

flashcard set

Earn XP

Description and Tags

Flashcards covering key C# programming concepts, collections, delegate declarations, event handlers, and code execution outputs.

Last updated 2:58 PM on 9/7/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

22 Terms

1
New cards

Queue

A collection class that represents a 'First In, First Out' collection of objects.

2
New cards

GetByIndex()

A method in SortedList that returns the value of the specified index.

3
New cards

Remove()

The method used to delete an item from an ArrayList.

4
New cards

delegate keyword

The keyword used to declare a delegate in a class.

5
New cards

Hashtable Value

The element that can be accessed in a hashtable when a key is specified.

6
New cards

ArrayList

An ordered, dynamic collection of objects where items can be added and removed from specified index locations.

7
New cards

add and remove accessors

Event accessors that are similar to get and set accessors used with properties.

8
New cards

Delegate

A type that safely encapsulates a method.

9
New cards

IDictionary

An interface that provides a list of elements that can be accessed through a key or value.

10
New cards

Sort()

A method used to arrange or categorize elements in a list object.

11
New cards

Event

A language construct usually known as a task initiator.

12
New cards

SortedList

A type of collection used to arrange key values, considered a combination of ArrayList and Hashtable.

13
New cards

System.Collections.Generic

The namespace containing several generic collection classes in C#.

14
New cards

-= operator

The operator used to remove an event subscription or event handler from a class.

15
New cards

ContainsKey()

A method used to check if a SortedList or Hashtable contains a specified key, returning a boolean value true if present.

16
New cards

RemoveAt(int index)

A SortedList method declared as void RemoveAt(int index) used to remove a specified element by calling its index.

17
New cards

Stack Push Method

The method syntax used to add an object to a Stack collection, such as objStack.Push("Ball").

18
New cards
<p>DelStringValue Execution</p>

DelStringValue Execution

Execution of DelStringValue stringVal = new DelStringValue(GetFullName) where stringVal("James Cruz") returns and outputs "James Cruz".

19
New cards
<p>RemoveToHash Execution</p>

RemoveToHash Execution

Code evaluating hashItem.ContainsKey("Apple") against a hashtable with "Coffee" and "Sugar", outputting "Not Available!".

20
New cards
<p>DelValues Generic Delegate Invocation</p>

DelValues Generic Delegate Invocation

Execution of generic delegates fullName("Paul Cruz") and totalAmount(230), resulting in output "Paul Cruz 230".

21
New cards
<p>DelTotal Signature Mismatch</p>

DelTotal Signature Mismatch

Attempting to bind delegate DelTotal(int total) to method GetTotalAmount(double totalAmount), causing compilation error: "No overload for 'Form1.GetTotalAmount(double)' matches delegate 'DelTotal'".

22
New cards
<p>Custom Event Accessor Syntax</p>

Custom Event Accessor Syntax

Syntax declaring custom event accessors using add { delName += value; } and remove { delName -= value; } blocks inside an event declaration.