1/52
Saving my future husband
What is an Entry Point?
Where a program starts. In a C# console program it's Main. In Unity, the engine is the program; it calls your Start and Update
What is Compile Error?
The compiler refuses to build your code. Nothing runs until it's fixed.
What is a Runtime error (exception)?
The code compiled, but something went wrong while it ran.
What is a Warning?
The code compiles, but the compiler thinks you probably made a mistake.
What is a Variable?
a named box that holds a value.
What is a Type?
What kind of value a variable can hold (int, float, bool, string…)
What is a Cast?
Converting a value to another type: (int)3.9 → 3.
What is an Operator?
A symbol that does something to values: +, -, *, /, %, ==, &&
What is integer division?
Dividing two ints throws away the remainder: 7 / 2 → 3.
What is a Modulo (%)?
the remainder after division: 7 % 2 → 1.
What is a Boolean expression?
an expression that is either true or false.
What is a Conditional?
code that runs only if a condition is true (if, else, switch).
What is a Loop?
code that repeats (for, while, do-while, foreach).
What is a Iteration?
one trip through a loop.
What is a Infinite loop?
a loop whose condition never becomes false.
What is an Off-by-one error?
a loop that runs one time too many or too few.
What is an Array?
a fixed-size, ordered collection of values of one type
What is a Element?
one value stored in an array.
What is an Index?
an element's position. The first index is 0.
What is a Length?
how many elements an array holds. The last index is Length - 1.
What is a IndexOutOfRangeException?
you asked for an index that doesn't exist.
What is a Traversal?
visiting each element of a collection, usually in order.
What is a Accumulator?
Accumulator — a variable that collects a result during a traversal (a running sum or count)
What is a Linear search?
Linear search — checking elements one at a time until you find what you want.
What is a List <T>?
a collection like an array that can grow. Uses Count instead of Length.
What is a Method?
a named block of code you can call.
What is a Signature?
a method's name and parameter list.
What is a Parameter?
the empty box in a method's parentheses: void Heal(int amount).
What is a Argument?
The value you put in that box when you call it: Heal(25).
What is a Return type?
What the method hands back. void means it hands back nothing.
What is a Return value?
The value a method hands back with return.
What is a Scope?
where in the code a variable's name can be used.
What is a Local variable?
declared inside a method; exists only while that method runs.
What is a Field?
a variable that belongs to an object (or, if static, to the class).
What is a Stack?
memory for method calls. Each call gets a stack frame holding its parameters and locals. When the method returns, its frame is gone.
What is a Heap?
memory for objects made with new from a class, and for arrays. Objects there outlive the method that made them.
What is a Value type?
the variable holds the value itself. int, float, bool, char, and structs like Vector2.
What is a Reference type?
the variable holds a reference (an arrow) to an object on the heap. Classes, arrays, string.
What is a Alias?
two variables holding references to the same object.
What is a null?
a reference that points to nothing.
What is a NullReferenceException?
you tried to use an object through a reference that was null.
What is a Allocation?
reserving space on the heap for a new object.
What is a Garbage?
a heap object nothing can reach anymore.
What is a Garbage collector (GC)?
the system that finds garbage and reclaims its memory. It decides when to run, and the game pauses while it works.
What is a Class?
a blueprint describing what data an object holds and what it can do.
What is a Object (instance)?
one thing built from a class with new.
What is a Constructor?
special code that runs when an object is created. Same name as the class, no return type.
What is a new?
creates an object and runs a constructor
What is a this?
the current object, inside its own methods.
What is a Encapsulation?
keeping fields private and letting outside code interact only through methods.
What is a Getter / setter?
methods that read or change a private field. A setter can enforce rules.
What is a static?
belongs to the class itself, not to any one object. One copy, shared.
What is a Instance member?
belongs to one object. Each object has its own copy