C# programs work with simple built-in value types and with custom classes.
For introductory reasoning, compare:
int jerseyNumber;
bool isAvailable;
double distanceMeters;
with:
Player player1;
Team team1;
The first group represents basic values.
The second group represents object references to custom types.
Examples include:
int → whole-number value
double → numeric value with fractional capability
bool → true/false value
A field such as:
int jerseyNumber;
is designed to hold one whole-number value.
A Player object can contain several related fields.
Conceptually:
Player
- name
- jerseyNumber
- isAvailable
- team
That is more structured than one integer or Boolean.
The class gives the program a type for the complete Player concept.
string Is Commonly Used Like a Basic Type but Is a Reference TypeYou have used:
string playerName = "Jordan";
For beginner code, string often feels similar to the basic value types because you assign and display text directly.
Technically, string is a reference type in C#.
You do not need advanced memory details here.
The useful distinction is that custom classes such as Player also produce object references and can contain their own structured state.
A field declared as:
int jerseyNumber;
expects an integer-compatible value.
A field declared as:
Team team;
expects a compatible Team reference.
The compiler uses type information to prevent many mismatched assignments.
Ask:
Is this one simple value, or is it a structured concept with its own state?
For:
jersey number
an int may fit.
For:
player
a custom Player class can fit.
The type should communicate the meaning of the information.
Do not reduce the topic to:
primitive = simple, custom = complicated.
A better idea is:
built-in/basic value types represent common individual values;
custom class types let the application represent concepts specific to its domain.