UPDATE 2026
Methods in Queue() - Answers .____
Enqueue (element) - Specified object to end of queue (puts in back of line) (LIKE
ADD IN LISTS)
Dequeue () - First object @ front removed from Queue (LIKE REMOVE IN LISTS)
Clear() - All items removed from queue
Peek() - Retrieves next item in queue, doesn't delete it (looks, good for loops)
Arrays & Collections: - Answers Objects that act as "containers:" have to be same
value types
ARRAY (.NET Class): Group of related variables (can be retrieved)
COLLECTIONS: (Classes in the .NET framework), variable in size (unlike arrays),
feature of C#
Arrays - Answers Class of HOMOGENEOUS DATATYPES (can also work w/
strings)
Shortcut from creating separate variables for every user-input. Use elements to
combine them into an array.
Exist in ALL programming languages!
Arrays in excel - Answers Highlight range of cells (indexes)
Indexes - Answers Order array elements starting from 0.
Array Format (single statement): - Answers type [#] arrayName array = new type
[arrayLength];
type = datatype of array
"arrayLength" is how many elements you want to add
# = elements, each with its own space/size/amount (values in bytes pulled aside and
reserved)
Instantiating new array - Answers (one line) = new type[length from 0];
Number in length assigns x locations in memory to hold values.
Starting Address is the beginning point
Default values for array elements - Answers BEFORE ADDING/ASSIGNING
VALUES:
Numeric = 0
Char = '\0' (null character)
Boolean = false
Date Time = 01/01/0001 00:00:00
Reference = null
Length of Array: - Answers SIZE:
, Amount of elements in the array (starting from 0)
Assign array elements their value: - Answers Assignment Statement:
Ascending Order: arrayName [index] = value;
Trying to assign more elements than the declared array holds. - Answers Index Out of
Range Exception
Declaring and assigning arrays/collections in one statement: - Answers
INITIALIZER:
type[] arrayName = {w, x, y, z}; (size infered)
Commas help understand amount of elements in array!
Array Length Property - Answers arrayName.Length - how many elements in array
Length can be used in average equations
(array sum of values / array length)
Foreach Loop - Answers ACCESS ARRAYS AND COLLECTIONS
foreach (type elementName in arrayName)
{
code;
}
(best if all elements, only certain use for)
Element name random, not established before
Array Shapes: - Answers One-dimensional (linear)
Rectangular/2D [row, column]
Properties of Arrays: - Answers Name.Length (number of elements in all
dimensions)
Static Method of Arrays: - Answers Methods of Array Class (Array.___)
Copy (array, array, length)
BinarySearch(array, value)
Sort(array)
Sort - Answers Sorts 1D array elements in ascending/alphabetic order. (DON'T
HAVE TO INSTANTUATE)
Array.Sort(NAME);
Binary Search - Answers Arrays & Lists (Collections)
Searches 1D array that's ALREADY SORTED ASCENDING (applies to both) for an
element, returns index.
ValueName = Array.BinarySearch(Name, Value);
" " = " "[ValueName];
(Negative number if index not found)
Copy - Answers CAN'T SET TWO ARRAYS @ EQUAL, will just create new name
for memory space.
OVERLOADED METHOD: More than one implementation.