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# Junior -
What is a difference between value type and reference type?
C# Junior -
What C# data types do you know?
C# Junior -
What is a data type?
C# Junior -
How do you recognize a method call in C#?
C# Junior