You already encountered:
NullReferenceException
when code tried to use an object member through null.
C# and .NET define many exception types so runtime failures can communicate different categories of problems.
At this stage, the goal is recognition and diagnosis—not writing try/catch logic.
NullReferenceExceptionThis occurs when code attempts to use an instance member through a reference that is null.
Example pattern:
player1.team.name
when:
player1.team = null
Diagnosis focuses on finding the first null reference in the chain.
InvalidOperationExceptionYou may encounter an InvalidOperationException when an operation is not valid for the object's current state.
The exact cause depends on the API being used.
Read the exception message and the failing statement rather than assuming one universal fix.
NotSupportedExceptionA NotSupportedException can indicate that an attempted operation is not supported in the current context.
Again, the exception name narrows the category.
The message and source location provide the next evidence.
A stronger debugging habit is:
The exception type is a clue.
It is not the entire diagnosis.
PC1 currently focuses on understanding program behavior and repairing introductory defects.
Detailed exception handling—such as choosing when to throw or catch exceptions—is taught later.
For now, learn to read exceptions as runtime evidence.