PRELIMS EVENT DRIVEN

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

1/53

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.

54 Terms

1
New cards

Delegate

This is a class in .Net that encapsulates a method. It is also a reference type data type that holds a reference method.

2
New cards

delegate

This keyword is used in declaring a Delegate on a class

3
New cards

<access modifier> delegate <return type> <delegate-name> (<parameters>)

Delegate Syntax

4
New cards

New Keyword

This is used to instantiate the delegate

5
New cards

Generic Delegates

This are not bound to any specific type. These can reference a method that returns and takes parameters of different types

6
New cards

public delegate X DisplayOutput(X arg);

Generic Delegate Syntax

7
New cards

Event

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

8
New cards

Event Handlers

The methos that invoked when an event occurs.

9
New cards

public event delegate_name event_name.

Event syntax

10
New cards

event_name += delegate_instance;

This is the syntax for adding a delagate to an event

11
New cards

+=

This operator allows adding an event to the class

12
New cards

Add and Remove

Two event accessors that are similar to get and set accessors

13
New cards

Add Accessor

This registers a new subscription to an event

14
New cards

Remove Accessor

This unregister the subscription to an event

15
New cards

Collections

This is a group of objects that provides a standard set of types for storing and managing objects, this usually contains lists, linked lists, dictionaries, and arrays

16
New cards

Standard collections

These are found in the System.Collections namespace

17
New cards

Generic collections

These are found in the System.Collections.Generic namespace

18
New cards

ArrayList

This is a collecitons class that is known for an ordered collection of objects.

19
New cards

Hashtable

This class stores key or value pairs where the key represent the value in the collection.

20
New cards

SortedList

This class stores key or value pairs where the key values sort values

21
New cards

Capacity

This gets or sets the capacity of the SortedList

22
New cards

Count

It gets the count of the number of elements in the SortedList

23
New cards

Item

It gets and sets the value associated with a specific key in the SortedList

24
New cards

Keys

These carry the keys in the SortedLIst

25
New cards

Values

These carry the values in the SortedList

26
New cards

void Add(object key, object value)

This adds an item with the specified key and value into the SortedList

27
New cards

void Clear()

This is used to remove all the items in the SortedList

28
New cards

bool ContainsValue(object value)

If the SortedLIst contains the specified value, then it will return the boolean value true.

29
New cards

bool ContainsValue(object value)

If the SortedList contains the specified values, then it will return the Boolean value true.

30
New cards

object GetByIndex(int index)

This method returns the value of the specified index.

31
New cards

object GetKey(int index)

This method returns the key of the specified index

32
New cards

void Remove(object key)

In the SortedLIst, a key that is specified will remove its element

33
New cards

void RemoveAt(int index)

This is an index that is specified will remove its element in the SortedList

34
New cards

Stack

This represents a Last In, First Out collection of Objects

35
New cards

Queue

This class represents a First In, First Out collection of Objects

36
New cards

IEnumberable

This is an interface that allows you to loop through elements in a collection

37
New cards

ICollection

This is an interface that allows you to determine the number of elements in a collections and copy them in a simple array type.

38
New cards

IDictionary

This is an interface that provides a list of elements that are accesible via a key or value rather than an index.

39
New cards

List

This is a generic collection that provides an efficient and dynamically allocated array, which is commonly used to store a list of duplicate objects

40
New cards

List variableName - new List();

Syntax of List

41
New cards

Add()

This list collection method is used to add items and is placed to the end of a list.

42
New cards

Remove()

This list collection method removes the specified item from the list of objects

43
New cards

IndexOf()

This list collection method is used to check the specified element in the specified list object

44
New cards

Sort()

This list collection methos is used to sort the element in the list object

45
New cards

Queue

This is a generic collection that represents a First In, First Out collection of objects

46
New cards

Queue queue_name = new Queue();

Syntax of Queue

47
New cards

Enqueue()

This method adds an element to the end of the queue.

48
New cards

Peek()

This will return the element at the beginning of the queue without removing it.

49
New cards

Dequeue()

This method removes and returns the value at the beginning of the queue

50
New cards

Stack

This generic collection represents the Last In, First Out collection of instances.

51
New cards

Stack stack_name = new Stack

Syntax of Stack

52
New cards

Push()

This methos adds an element at the top in the stack

53
New cards

Peek()

This will return the element at the top of the stack without removing it.

54
New cards

Pop()

This method removes and returns the value at the top of the stack.