EVENT DRIVEN REVIEWER

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/45

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

46 Terms

1
New cards

Delegate

A class in .NET that encapsulates a method.

2
New cards

Declaring and instantiating a delegate

The delegate keyword is used in declaring a delegate on a class.

3
New cards

new

To instantiate the delegate, use the 'new' keyword that is associated with the method.

4
New cards

Invoking Delegates

Invoking on referenced methods can also be done in delegates.

5
New cards

C#.NET

Events are usually task initiators. Clicking a mouse or pressing the Enter key are common events.

6
New cards

event

A member of a class that is fired whenever a specific action takes place.

7
New cards

event handlers

Methods invoked when an event occurs, registered through delegates.

8
New cards

Event Declaration

A delegate must be declared before declaring an event.

9
New cards

Event Accessors

Using the += operator allows adding an event to the class.

10
New cards

add accessor

To register a new subscription to an event.

11
New cards

remove accessor

To unregister the subscription.

12
New cards

collections

A group of objects including lists, linked lists, dictionaries, and arrays.

13
New cards

2 types of collections

Standard collections and Generic collections.

14
New cards

Standard collections

Collections found in the System.Collections namespace.

15
New cards

Generic collections

Collections found in the System.Collections.Generic namespace.

16
New cards

ArrayList

A collection class for an ordered collection of objects.

17
New cards

Hashtable

Stores key or value pairs, with the key representing the value.

18
New cards

SortedList

A combination of ArrayList and Hashtable that sorts key-value pairs.

19
New cards

Item

Gets and sets the value associated with a specific key in the SortedList.

20
New cards

void Add(object key, object value)

Adds an item with the specified key and value into the SortedList.

21
New cards

void Clear()

Removes all items in the SortedList.

22
New cards

bool ContainsValue(object value)

Returns true if the SortedList contains the specified value.

23
New cards

object GetByIndex(int index)

Returns the value at the specified index.

24
New cards

object GetKey(int index)

Returns the key at the specified index.

25
New cards

void Remove(object key)

Removes the element associated with the specified key from the SortedList.

26
New cards

void RemoveAt(int index)

Removes the element at the specified index from the SortedList.

27
New cards

Stack

Represents a LIFO collection of objects using push and pop operations.

28
New cards

Queue

Represents a FIFO collection of objects using enqueue and dequeue operations.

29
New cards

IEnumerable

An interface that allows looping through elements in a collection.

30
New cards

ICollection

An interface that allows determining the number of elements in a collection.

31
New cards

IDictionary

An interface that provides access to elements via a key or value.

32
New cards

Generics

Makes code reusable across different types by creating templates with placeholder types.

33
New cards

Generic Collections

Avoids the need for custom collections for each type in the application.

34
New cards

List<T>

A generic collection providing a dynamically allocated array for duplicate objects.

35
New cards

List<T> variableName = new List<T>();

Syntax for creating a List<T> collection.

36
New cards

Indexof()

Method used to check for a specified element in a list object.

37
New cards

Queue<T>

A generic collection representing a FIFO collection of objects.

38
New cards

Queue<int> ageQueue = new Queue<int>();

Syntax of the generic queue.

39
New cards

Enqueue()

Adds an element to the end of a queue.

40
New cards

Peek()

Returns the element at the beginning of the queue without removing it.

41
New cards

Dequeue()

Removes and returns the value at the beginning of the queue.

42
New cards

Stack<T>

A generic collection representing a LIFO collection of instances.

43
New cards

Stack<int> ageStack = new Stack<int>(20);

Syntax of the generic stack.

44
New cards

Push()

Adds an element at the top of the stack.

45
New cards

Peek()

Returns the element at the top of the stack without removing it.

46
New cards

Pop()

Removes and returns the value at the top of the stack.