What is an object reference in C#?
Experience Level: Junior
Tags: C#
Answer
When you create an object, it gets stored to memory. In the source code the newly created objects are assigned to variables. But in many cases the variable doesn't hold the whole object. It holds just link to a location in memory where the object is stored. This link is called an object reference because it refers to a location in memory where the object is stored.
Related C# job interview questions
What is a class instance in C#?
C# JuniorWhat is a difference between value type and reference type?
C# JuniorWhat C# data types do you know?
C# JuniorWhat is a data type?
C# JuniorHow do you recognize a method call in C#?
C# Junior